Floatadd

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 16:27, 26 April 2014
MP2 (Talk | contribs)

← Previous diff
Revision as of 19:57, 1 September 2019
Freaksken (Talk | contribs)
(Add redundant note)
Next diff →
Line 3: Line 3:
{{LowercaseFunction|floatadd}} {{LowercaseFunction|floatadd}}
-{{Description|Adds two floats together. This function is redundant as the standard operator (+) does the same thing. }}+{{Description|Adds two floats together.}}
 + 
 +{{Note|This function is rather redundant, for it is no different than the conventional addition operator (+).}}
{{Parameters|Float:Number1, Float:Number2}} {{Parameters|Float:Number1, Float:Number2}}

Revision as of 19:57, 1 September 2019


floatadd

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


Description:

Adds two floats together.


Image:32px-Ambox_warning_orange.png

Note

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


Parameters:
(Float:Number1, Float:Number2)
Float:Number1First float.
Float:Number2Second float.


Return Values:

The sum of the two given floats.


Example Usage:

public OnGameModeInit()
{
    new Float:Number1 = 2, Float:Number2 = 3; //Declares two floats, Number1 (2) and Number2 (3)
    new Float:Sum;
    Sum = floatadd(Number1, Number2);       //Saves the Sum(=2+3 = 5) of Number1 and Number2 in the float "Sum"
    return 1;
}

Related Functions

The following functions may be helpful as they relate to this function in one way or another.

Personal tools
In other languages