Returns the decimal part of the given value
frac(n)
double
Returns: double
This function will return fractional part of n — that is the part behind the decimal dot.
n
double value; value = frac(7.2);
This code sets value to 0.2.
value
double value; value = frac(3.025);
This code sets value to 0.025.
Back to number_functions
There was an error while loading. Please reload this page.