ModF (open)
Splits a value into an integral and a fractional part.
Syntax
LOADLIB "wh::float.whlib";
RECORD FUNCTION ModF(FLOAT value)Parameters
FLOAT valueThe FLOAT value to split
Return value
RECORDA RECORD containing the splitted @italic value
fracpartThe FLOAT fractional part
intpartThe FLOAT integral part
Description
This function returns a RECORD containing the integral part of value (the part before the decimal point) and the fractional part of value (the part after the decimal point).
Examples
// modf_rec.intpart = 3.0, modf_rec.fracpart = 0.1415...
RECORD modf_rec := ModF(PI);