fmod - chung-leong/qb GitHub Wiki
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
.
Parameters:
x - The dividend. It can be a scalar or an array.
y - The divisor. It can be a scalar or an array.
Return Value:
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.
Version
1.0 and above.