Difference between revisions of "Pow"
Jump to navigation
Jump to search
imported>Zumbs (added FOSE workaround for missing pow function) |
imported>WarMachineDD7 |
||
Line 2: | Line 2: | ||
'''Pow''' When given two numbers will return the value of the first to the power of the second. | '''Pow''' When given two numbers will return the value of the first to the power of the second. | ||
=='''Syntax'''== | =='''Syntax'''== | ||
Line 12: | Line 10: | ||
==Examples== | ==Examples== | ||
float x | |||
float y | |||
float answer | |||
set x to 2.0 | |||
set y to 5.0 | |||
set answer to pow x y ;answer will contain 2^5 which is 32.0 | |||
==Notes== | ==Notes== | ||
Line 38: | Line 43: | ||
*Link to TES4 Construction Set Wiki: [http://cs.elderscrolls.com/constwiki/index.php/Cos Cos (OBSE function)] | *Link to TES4 Construction Set Wiki: [http://cs.elderscrolls.com/constwiki/index.php/Cos Cos (OBSE function)] | ||
[[Category:Functions_(FOSE)]] | |||
[[Category: |
Latest revision as of 18:40, 1 February 2013
Description[edit | edit source]
Pow When given two numbers will return the value of the first to the power of the second.
Syntax[edit | edit source]
pow x y will return x^y
pow x .5 will return the square root of x
Examples[edit | edit source]
float x float y float answer set x to 2.0 set y to 5.0 set answer to pow x y ;answer will contain 2^5 which is 32.0
Notes[edit | edit source]
- Sin, cos, tan, pow, log, and abs (particularly pow and log) are extremely slow. Do not use them in script blocks that get executed every frame.
- This function is new in the GECK, and was not available in the TES4 Construction Set. However, it was available through the OBSE script extender.
- Pow can be computed using the FOSE function exp. The line
set result to pow x y
is equivalent to
set result to log x set result to y * result set result to exp result
This is likely to be very slow and should not be used in script blocks executed every frame.
See Also[edit | edit source]
- Abs
- Cos
- Log
- Sin
- Tan
- Link to TES4 Construction Set Wiki: Acos (OBSE function)
- Link to TES4 Construction Set Wiki: Cos (OBSE function)