Syntax
modf(number, number)
Description
The modf() function returns the fractional and integer parts of the number in a two-item array. Both parts have the same sign as the number. The both parts are returned as a float.
If an integer is used, then the resulting integer part will be 0 and the fractional part will be float of the given integer
Example
include("math")
println(modf(10.25))
println(modf(-10.25))
println(modf(10))
[10, 0.25]
[-10, -0.25]
[0, 10]