Floatmul

From SA-MP Wiki

Jump to: navigation, search

floatmul

Image:Farm-Fresh text lowercase.png Note: This function name starts with a lowercase letter.


Description:

Multiplies two floats with each other.


Image:32px-Ambox_warning_orange.png

Note

This function is rather redundant, for it is no different than the conventional multiplication operator (*).


Parameters:
(Float:oper1, Float:oper2)
oper1First Float.
oper2Second Float, the first one gets multiplied with.


Return Values:

The product of the two given floats


Example Usage:

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

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Personal tools
Navigation
Toolbox