CPoint:Floor
The Floor method replaces the x and y members of the CPoint with the next lower integer value. For example, x=1.3 becomes x=1, and x=-16.2 becomes x=-17.
P = CPoint:Floor() P returned is the original CPoint object. This allows the Floor method to be used as part of an operator expression, if desired. On failure, nil is returned. |
The following script creates a CPoint object and applies the Floor method to its values.
|
-- create a CPoint object |
|
-- result: x=4.4, y=-12.7 |
|
-- compute the floor values |
|
-- result: x=4, y=-13 |
CPoint class, Ceil, Round, CPoint Math Operators
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.