isInfinity

Determines whether x is a positive or negative infinity.

bool
isInfinity
(
F
)
(
F x
)

Parameters

F

Type of the floating point number.

x F

Floating point number.

Return Value

Type: bool

$(D_KEYWORD true) if x is infinity, $(D_KEYWORD false) otherwise.

Examples

assert(isInfinity(float.infinity));
assert(isInfinity(-float.infinity));
assert(isInfinity(double.infinity));
assert(isInfinity(-double.infinity));
assert(isInfinity(real.infinity));
assert(isInfinity(-real.infinity));

See Also

$(D_PSYMBOL isFinite).

Meta