fmax

Returns the larger of x and y.

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

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

Examples

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

Meta

Suggestion Box / Bug Report