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
functions:trunc [2019/04/20 23:55] – created korshunfunctions:trunc [2019/08/26 21:03] (current) – removed korshun
Line 1: Line 1:
-====== trunc ====== 
-{{tag>math rounding}} 
-''fixed trunc(fixed x)'' 
- 
-===== Description ===== 
-Rounds x by truncating the fractional part and returns the result as a fixed-point number. 
- 
-See the article on [[:rounding]] for all rounding 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.1555793756.txt.gz · Last modified: 2019/04/20 23:55 by korshun