signBit

Determines whether the sign bit of x is set or not.

If the sign bit, x is a negative number, otherwise positive.

bool
signBit
(
F
)
(
F x
)

Parameters

F

Type of the floating point number.

x F

Floating point number.

Return Value

Type: bool

$(D_KEYWORD true) if the sign bit of x is set, $(D_KEYWORD false) otherwise.

Examples

assert(signBit(-1.0f));
assert(!signBit(1.0f));

assert(signBit(-1.0));
assert(!signBit(1.0));

assert(signBit(-1.0L));
assert(!signBit(1.0L));

Meta