-
Notifications
You must be signed in to change notification settings - Fork 14
fmod
Chung Leong edited this page Jan 10, 2022
·
3 revisions
fmod - Floating point remainder
float fmod( float $x, float $y )
fmod() returns the floating point remainder of dividing the dividend x by the divisor y. The reminder is defined as: x = i * y + r
, for some integer i. If y is non-zero, r has the same sign as x and a magnitude less than the magnitude of y.
fmod($x, $y)
is equivalent to $x % $y
.
x - The dividend. It can be a scalar or an array.
y - The divisor. It can be a scalar or an array.
The floating point remainder of x / y. If x or y is an array, then return value is also an array, the size of which match the larger of x and y.
1.0 and above.