Function |to_i16
conv/f64::|to_i16
Usage
|to_i16(value, pos_infinity, neg_infinity, nan)
Parameters
↳ value:
f64
↳ pos_infinity:
i16
↳ neg_infinity:
i16
↳ nan:
i16
Return
↴ i16
Turns f64
into i16
.
f64
is truncated to fit into i16
, and in case floating-point value does
not describe a real number:
pos_infinity
is used whenf64
is a positive infinity,neg_infinity
is used whenf64
is a negative infinity,nan
is used whenf64
is not a number.