20-sim webhelp > Language Reference > Functions > Arithmetic > floor


floor

Navigation:  Language Reference > Functions > Arithmetic >

floor

Previous pageReturn to chapter overviewNext page

Syntax

Y = floor(X);

Description

Rounds X or the elements of X to the nearest integers less than or equal to X.

Examples

X

floor(X)

1

1

2.1

2

-2.6

-3

3.4

3

[1.1,-2.7;3.5,-4.1]

[1,-3;3,-5]

Limitations

X and Y must have the same size.