modf

fnreal modf(real x, ref real i) @trusted nothrow @nogc

Breaks x into an integral part and a fractional part, each of which has the same sign as x. The integral part is stored in i.

Returns

The fractional part of x.
x i (on input) modf(x, i) i (on return)
+∞ anything ±0.0 +∞