fpToInt

private fnDst fpToInt(Dst, S)(S v) if (is(S == float) || is(S == double) || is(S == real))

Floating-to-integer conversion requiring an exactly integral, in-range value.

Parameters

Dstinteger destination type.
Sfloating source type.
vthe source value.

Returns

The checked conversion.

Throws

VarException for NaN, infinities, fractions and out-of-range values.