std-floor, std-ceiling | ![]() |
std-floor returns the lower integer, truncated towards positive infinity.
std-ceiling the upper integer of a integer or real number, truncated towards negative infinity.
On positive numbers STD-FLOOR returns the same as FIX, but on negative numbers FIX returns the same number as STD-CEILING. To be consistent with ANSI CL definitions we introduce these functions. FIX is the same as TRUNCATE which truncates towards zero.
(std-floor 1.1) => 1 (std-floor -1.1) => -2 (std-ceiling 1.1) => 2 (std-ceiling -1.1) => -1 (fix 1.1) => 1 (fix -1.1) => -1
num: Any number, if integer or real.
Always a integer number.
None.
(std-require 'STDMATH)
Defined in STDMATH