Difference between revisions of "Min"
From King Arthur's Gold Wiki
Shadlington (Talk | contribs) (Created page with "<onlyinclude> Returns the smaller of the two given numbers. </onlyinclude> This method has two variants - one for ints, the other for floats. <syntaxhighlight lang="cpp"> float ...") |
Shadlington (Talk | contribs) |
||
Line 2: | Line 2: | ||
Returns the smaller of the two given numbers. | Returns the smaller of the two given numbers. | ||
</onlyinclude> | </onlyinclude> | ||
+ | |||
+ | This method is part of the Maths namespace so you need to prefix calls to it with 'Maths::'. | ||
This method has two variants - one for ints, the other for floats. | This method has two variants - one for ints, the other for floats. | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
− | float Min(float a, float b) | + | float Maths::Min(float a, float b) |
− | int Min(int a, int b) | + | int Maths::Min(int a, int b) |
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Scripting]] | [[Category:Scripting]] | ||
[[Category:Global Functions]] | [[Category:Global Functions]] |
Latest revision as of 22:24, 6 September 2012
Returns the smaller of the two given numbers.
This method is part of the Maths namespace so you need to prefix calls to it with 'Maths::'.
This method has two variants - one for ints, the other for floats.
float Maths::Min(float a, float b) int Maths::Min(int a, int b)