Difference between revisions of "Sqrt - Math"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Jlundin
(New page: Category:Scripting Category:Papyrus '''Member of:''' Math Script Calculates the square root of the number it is given. == Syntax == <source lang="papyrus"> float Function sqr...)
 
imported>JustinOther
m (→‎Examples: Floatified float params)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
[[Category:Scripting]]
[[Category:Scripting]]
[[Category:Papyrus]]
[[Category:Papyrus]]
[[Category:Non-delayed Native Function]]
'''Member of:''' [[Math Script]]
'''Member of:''' [[Math Script]]


Line 18: Line 19:
== Examples ==
== Examples ==
<source lang="papyrus">
<source lang="papyrus">
float x = sqrt(4) ; x == 2
float x = sqrt(4.0) ; x == 2
float y = sqrt(10) ; y ~= 3.16228
float y = sqrt(10.0) ; y ~= 3.16228
</source>
</source>


== See Also ==
== See Also ==
*[[Math Script]]
*[[Math Script]]

Latest revision as of 10:54, 8 October 2012

Member of: Math Script

Calculates the square root of the number it is given.

Syntax[edit | edit source]

float Function sqrt(float afValue) native global

Parameters[edit | edit source]

  • afValue: The value to get the square root of.

Return Value[edit | edit source]

The square root of the passed-in value.

Examples[edit | edit source]

float x = sqrt(4.0) ; x == 2
float y = sqrt(10.0) ; y ~= 3.16228

See Also[edit | edit source]