FixedMul

From ZDoom Wiki

Jump to: navigation, search

int FixedMul (int a, int b)

Usage

Returns the fixed point result of multiplying two fixed point numbers.

Parameters

  • a, b
The fixed point numbers to multiply.

Return value

The result of fixed point numbers multiplication.

Examples

You can't use normal multiplication operator on fixed point numbers. See the results of this example:

script 1 (void)
{
    Print (f: FixedMul (0.5, 0.5)); // 0.25
    Print (f: 0.5 * 0.5);           // 16384
}
Personal tools