floor

Returns the largest integer that is less than or equal to the specified number.

Syntax

floor(x)

Parameters

Parameter

Type

Description

x

number

Numeric value

Return

Returns the largest integer that is less than or equal to x.

Examples

Python

import math
x = 1.7
y = math.floor(x)
# y now is equal to 1

NexScript

x = 1.7
y = floor(x)
% y now is equal to 1