This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
functions:trunc [2019/04/20 23:55] – removed korshun | functions:trunc [2019/04/20 23:55] – created korshun | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== trunc ====== | ||
+ | {{tag> | ||
+ | '' | ||
+ | |||
+ | ===== Description ===== | ||
+ | Rounds x by truncating the fractional part and returns the result as a fixed-point number. | ||
+ | |||
+ | See the article on [[: | ||
+ | |||
+ | ===== Examples ===== | ||
+ | < | ||
+ | trunc(2.3) -> 2.0 | ||
+ | trunc(3.8) -> 3.0 | ||
+ | trunc(5.5) -> 5.0 | ||
+ | trunc(-2.3) -> -2.0 | ||
+ | trunc(-3.8) -> -3.0 | ||
+ | trunc(-5.5) -> -5.0 | ||
+ | </ | ||