Description
Returns the integer portion of a number.
Arguments
number is value you want to round down to the nearest integer.
Returns
Whole number value
Action
Int returns the integer portion of a given number by rounding it down to the next smallest integer.
Examples
Int (123.678)
Returns 123.
Int (-123.678)
Returns -124.
Int (-123.1)
Returns -124.
Comments
Fix (n) (or Truncate (n)) and Int (n) are the same except when n is negative, in which case Fix and Truncate return the first integer greater than or equal to n, and Int returns the first integer smaller than or equal to n. For example,
Fix (-10.2)
Truncate (-10.2)
Both return –10.
Int (-10.2)
Returns -11.