Detailed Description

Functions

Float64 StepEx (Float64 a, Float64 x)
 
Float32 Boxstep (Float32 a, Float32 b, Float32 x)
 
Float64 Boxstep (Float64 a, Float64 b, Float64 x)
 
Float32 Smoothstep (Float32 a, Float32 b, Float32 x)
 
Float64 Smoothstep (Float64 a, Float64 b, Float64 x)
 
Float32 Modulo (Float32 a, Float32 b)
 
Float64 Modulo (Float64 a, Float64 b)
 
Int32 LModulo (Int32 a, Int32 b)
 
Int64 LModulo (Int64 a, Int64 b)
 
Float32 Bias (Float32 b, Float32 x)
 
Float64 Bias (Float64 b, Float64 x)
 
Float32 Truncate (Float32 x)
 
Float64 Truncate (Float64 x)
 

Function Documentation

◆ StepEx()

Float64 StepEx ( Float64  a,
Float64  x 
)

Returns 1.0 if x is greater than or equal to a, else 0.0.

Parameters
[in]aA double-precision floating point value.
[in]xA double-precision floating point value.
Returns
The step value (0.0 or 1.0).

◆ Boxstep() [1/2]

Float32 Boxstep ( Float32  a,
Float32  b,
Float32  x 
)

Returns 0.0 if x is less than a and 1.0 if x is greater than b, else returns x mapped on the range [a,b].

Parameters
[in]aA single-precision floating point value.
[in]bA single-precision floating point value.
[in]xA single-precision floating point value.
Returns
The box stepped value between 0.0 and 1.0.

◆ Boxstep() [2/2]

Float64 Boxstep ( Float64  a,
Float64  b,
Float64  x 
)

Returns 0.0 if x is less than a and 1.0 if x is greater than b, else returns x mapped on the range [a,b].

Parameters
[in]aA double-precision floating point value.
[in]bA double-precision floating point value.
[in]xA double-precision floating point value.
Returns
The box stepped value between 0.0 and 1.0.

◆ Smoothstep() [1/2]

Float32 Smoothstep ( Float32  a,
Float32  b,
Float32  x 
)

Returns 0.0 if x is less than a and 1.0 if x is greater than b, else returns x mapped on the range [a,b].

Note
The mapping is smoothed using an ease-in/ease-out curve.
Parameters
[in]aA single-precision floating point value.
[in]bA single-precision floating point value.
[in]xA single-precision floating point value.
Returns
The smoothed stepped value between 0.0 and 1.0.

◆ Smoothstep() [2/2]

Float64 Smoothstep ( Float64  a,
Float64  b,
Float64  x 
)

Returns 0.0 if x is less than a and 1.0 if x is greater than b, else returns x mapped on the range [a,b].

Note
The mapping is smoothed using an ease-in/ease-out curve.
Parameters
[in]aA double-precision floating point value.
[in]bA double-precision floating point value.
[in]xA double-precision floating point value.
Returns
The smoothed stepped value between 0.0 and 1.0.

◆ Modulo() [1/2]

Float32 Modulo ( Float32  a,
Float32  b 
)

Returns a modulo b.

Parameters
[in]aA single-precision floating point value.
[in]bA single-precision floating point value.
Returns
The modulo value.

◆ Modulo() [2/2]

Float64 Modulo ( Float64  a,
Float64  b 
)

Returns a modulo b.

Parameters
[in]aA double-precision floating point value.
[in]bA double-precision floating point value.
Returns
The modulo value.

◆ LModulo() [1/2]

Int32 LModulo ( Int32  a,
Int32  b 
)

Returns a modulo b (integer modulo).

Parameters
[in]aA 32-bit integer value.
[in]bA 32-bit integer value.
Returns
The modulo value.

◆ LModulo() [2/2]

Int64 LModulo ( Int64  a,
Int64  b 
)

Returns a modulo b (integer modulo).

Parameters
[in]aA 64-bit integer value.
[in]bA 64-bit integer value.
Returns
The modulo value.

◆ Bias() [1/2]

Float32 Bias ( Float32  b,
Float32  x 
)

Returns the bias as the defined in the book "Texturing and Modeling" by Ebert.

Parameters
[in]bThe bias value.
[in]xA single-precision floating point value.
Returns
The bias value.

◆ Bias() [2/2]

Float64 Bias ( Float64  b,
Float64  x 
)

Returns the bias as the defined in the book "Texturing and Modeling" by Ebert.

Parameters
[in]bThe bias value.
[in]xA double-precision floating point value.
Returns
The bias value.

◆ Truncate() [1/2]

Float32 Truncate ( Float32  x)

Returns the next integer value towards zero.

Parameters
[in]xThe 32-bit floating point value to truncate.
Returns
The truncated value.

◆ Truncate() [2/2]

Float64 Truncate ( Float64  x)

Returns the next integer value towards zero.

Parameters
[in]xThe 64-bit floating point value to truncate.
Returns
The truncated value.