Skip to content
Vašek edited this page Jan 14, 2019 · 2 revisions

frac

Returns the decimal part of the given value

Syntax:

frac(n)
Argument Description
double n The given number

Returns: double

Description:

This function will return fractional part of n — that is the part behind the decimal dot.

Example:

double value;
value = frac(7.2);

This code sets value to 0.2.

Example 2:

double value;
value = frac(3.025);

This code sets value to 0.025.

Back to number_functions

Clone this wiki locally