DMath.min(a,b);
a - { Scalar or vector } b - { Scalar or vector}
Returns the minimum of two same-typed scalars a and b or the respective components of two same-typed vectors a and b. The result is a three-component vector.
min implementation for a float3 vector.
float3 min(float3 a, float3 b)
{
return float3(a.x < b.x ? a.x : b.x,
a.y < b.y ? a.y : b.y,
a.z < b.z ? a.z : b.z);
}
min is sometimes recognized as a compiler built-in code in certain graphic compilers.
When the compiler encounters a call to a built-in function, it can choose to generate inline code to perform the operation instead of a function call, which can lead to more efficient code.