math.pow

From GMod Wiki

Revision as of 22:09, 25 May 2011 by !cake (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax math.pow( Float number, Float toThePowerOf )
Where is this used?
Description:
Multiplies the first argument by itself the amount of times specified in the second argument.
Returns: Float number
Part of Library: Math
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Math.pow]Math.pow [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionThis calculates 4 to the 2 power.
Used onNewerShared.png
Code
 
math.pow(4,2); //This is 4 to the 2 power. (4 squared)  The answer (or return value) will be 16.
 
OutputN/A
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox