isFinite

Determines if x is finite.

@trusted pure nothrow @nogc
bool
isFinite
(
X
)
(
X x
)

Parameters

x X

a floating point number.

Return Value

Type: bool

true if x is finite.

Examples

assert( isFinite(1.23f));
assert( isFinite(float.max));
assert( isFinite(float.min_normal));
assert(!isFinite(float.nan));
assert(!isFinite(float.infinity));

Meta