Skip to end of banner
Go to start of banner

floor

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Availability

This routine is available starting with katl-commons 2.5.

Syntax

floor(number, significance)


Description


Rounds number down, toward zero, to the nearest multiple of significance.

Parameters

ParameterTypeRequiredDescription
numberNumberYesThe numeric value you want to round.
significanceNumberYesThe multiple to which you want to round.

Return type

number

Example

number a = floor(4.5, 2);
print("a= " + a);
number b = floor(-2.5, -2);
print("b= " + b);

Prints:

         a= 4;

         b= -2;

 Notes

  • If number is positive and significance is negative, FLOOR returns the NaN  value.

See also

  • No labels