toPrec

Round argument to a specific precision.

D language types specify a minimum precision, not a maximum. The toPrec() function forces rounding of the argument f to the precision of the specified floating point type T.

Parameters

T

precision type to round to

f
Type: float

value to convert

Return Value

Type: T

f in precision of type T

Suggestion Box / Bug Report