Decimal.opCast

For bool, follows the normal cast(bool) rules for floats in D. Numbers <= -1 returns true, numbers between -1 and 1 return false, numbers >= 1 return true.

For floating point types, returns a floating point type as close to the decimal as possible.

struct Decimal(Hook = Abort)
const
opCast
(
T
)
()
if (
is(T == bool) ||
isFloatingPoint!T
)

Meta