fraction(var x)

Fractional part of x .

Parameters:

x - any var.

Returns:

Decimals of x .

Speed:

Fast

Example:

x = fraction(2); // x is now 0
x = fraction(2.997); // x is now 0.997 
x = fraction(0.123); // x is now 0.123 

See also:

integer