Floatdiv
From SA-MP Wiki
Floatdiv
Dividates one float from another one.
(Float:Number1, Float:Number2)
| Float:Number1 | First Float |
| Float:Number2 | Second Float (dividates the first float) |
| Returns | The 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.
- Floatadd: Adds two floats.
- Floatsub: Subtrates two floats.
- Floatmul: Multiplies two floats.
