Math.floor

Math.floor

Math.floor

Function

Round down. Returns the largest integer less than or equal to value.

Syntax

Parameters

ParametersTypeRequiredDefault valueDescription
valueNumberYesNoneThe number that participates in rounding.

Return value

TypeDescription
Int/FloatReturns the largest integer less than or equal to value. An Int is returned for integer results, and a Float for non-integer or non-finite results.

Example

Notes

  • Integer results return Int.