ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:intdiv

This is an old revision of the document!


Table of Contents

IntDiv

fixed IntDiv(int a, int b)

Description

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).

For a safe version see SafeIntDiv().

Examples

IntDiv(3, 2) -> 1.5
IntDiv(123456, 123) -> 1003.707
functions/intdiv.1489422227.txt.gz · Last modified: 2017/03/13 18:23 by korshun