ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:trunc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
functions:trunc [2017/03/15 16:32] korshunfunctions:trunc [2019/08/26 21:03] (current) – removed korshun
Line 1: Line 1:
-====== trunc ====== 
-{{tag>math truncing}} 
-''fixed trunc(fixed x)'' 
- 
-===== Description ===== 
-Returns x with the fractional part truncated as a fixed-point number. 
- 
-See the article on [[:rounding]] for all truncing modes. 
- 
-===== Examples ===== 
-<code> 
-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 
-</code> 
  
functions/trunc.1489588377.txt.gz · Last modified: 2017/03/15 16:32 by korshun