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
Last revisionBoth sides next revision
functions:trunc [2017/03/15 16:32] korshunfunctions:trunc [2019/04/20 23:55] – created korshun
Line 1: Line 1:
 ====== trunc ====== ====== trunc ======
-{{tag>math truncing}}+{{tag>math rounding}}
 ''fixed trunc(fixed x)'' ''fixed trunc(fixed x)''
  
 ===== Description ===== ===== Description =====
-Returns with the fractional part truncated as a fixed-point number.+Rounds by truncating the fractional part and returns the result as a fixed-point number.
  
-See the article on [[:rounding]] for all truncing modes.+See the article on [[:rounding]] for all rounding modes.
  
 ===== Examples ===== ===== Examples =====