frac

frac()

Overview

The floor() function takes a decimalValue as an argument, and returns only the fraction part of the value. For example, the fraction part of 2.50 is 0.50.

Return Type

  • Number

Syntax

<variable> = <inputNumber>.frac();

(OR)

<variable> = frac(<inputNumber>);
ParameterData typeDescription
<variable>NUMBERVariable that will contain the returned value.
<inputNumber>NUMBERThe input number whose fraction part is required.

Examples

 inputNumber = 24.6;
 info inputNumber.frac(); // Returns 0.6
 
 inputNumber = -25.1;
 info frac(inputNumber); // Returns -0.1

Related Links

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohodeluge.com