fmin

Returns the smaller of x and y.

If one of the arguments is a NaN, the other is returned.

@safe pure nothrow @nogc
real
fmin
(
real x
,
real y
)

Examples

assert(fmin(0.0, 2.0) == 0.0);
assert(fmin(-2.0, 0.0) == -2.0);
assert(fmin(real.infinity, 2.0) == 2.0);
assert(fmin(real.nan, 2.0) == 2.0);
assert(fmin(2.0, real.nan) == 2.0);

Meta

Suggestion Box / Bug Report