Andrei Alexandrescu wrote:
Walter?
D % for floating point arguments does what the C99 fmod function does:
Description The fmod functions compute the floating-point remainder of x/y. Returns The fmod functions return the value x - ny, for some integer n such that, if y is nonzero, the result has the same sign as x and magnitude less than the magnitude of y. If y is zero, whether a domain error occurs or the fmod functions return zero is implementation-defined.