IntDiv

fixed IntDiv(int a, int b)

Description

Divides two integers and returns a fixed-point result. Allows division of any 2 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