Floatdiv

From SA-MP Wiki

Jump to: navigation, search

Floatdiv


Dividates one float from another one.


Parameters:
(Float:Number1, Float:Number2)
Float:Number1First Float
Float:Number2Second Float (dividates the first float)


ReturnsThe quotient of the two given floats


public OnGameModeInit()
{
    new Float:Number1=8.05, Float:Number2=3.5; //Declares two floats, Number1 (8.05) and Number2 (3.5)
    new Float:Quotient;
    Quotient=Floatmul(Number1, Number2);       //Saves the quotient(=8.05/3.5 = 2.3) of Number1 and Number2 in the float "Quotient"
    return 1;
}

Related Functions

The following functions might be useful as well, as they're related to this function in one way or another.

Personal tools