ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:intdiv

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:intdiv [2017/03/13 18:23] korshunfunctions:intdiv [2017/03/15 16:44] korshun
Line 1: Line 1:
 ====== IntDiv ====== ====== IntDiv ======
 +{{tag> math numerical_algorithms}}
 ''fixed IntDiv(int a, int b)'' ''fixed IntDiv(int a, int b)''
  
Line 5: Line 6:
 Divides two integers and returns a fixed-point result. Allows division of any two integers whose ratio is not higher than 32767. Divides two integers and returns a fixed-point result. Allows division of any two integers whose ratio is not higher than 32767.
  
-Can be used as a shorthand for ''FixedDiv(a<<16, b<<16)''.+Can be used as a shorthand for ''%%FixedDiv(a<<16, b<<16)%%''.
  
-For a safe version see ''[[SafeIntDiv|SafeIntDiv()]]''.+For a safe version see [[SafeIntDiv|SafeIntDiv()]].
  
 ===== Examples ===== ===== Examples =====
functions/intdiv.txt · Last modified: 2017/04/15 17:20 by korshun