Supported Browsers Home   
MGL_FixMul Previous   
MGL_addCustomMode Next   
External Functions Up   

MGL_FixMulDiv

Multiplies a fixed point number by another and divides by a third number.

Declaration

fix32_t MGLAPI MGL_FixMulDiv(
    fix32_t a,
    fix32_t b,
    fix32_t c)

Prototype In

mgraph.h

Parameters

a

First number to multiply

b

Second number to multiply

c

Third number to divide by

 

Return Value

Results of the multiplication and division.

Description

This function multiplies a 16.16 fixed point number by another producing a 32.32 intermediate result. This 32.32 result is then divided by another 16.16 number to produce a 16.16 result. Because this routine maintains maximum precision during the multiplication stage, you can multiply numbers that would normally overflow the standard MGL_FixMul function.

See Also

MGL_FixMul, MGL_FixDiv

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com