Difference between revisions of "Pow"
Jump to navigation
Jump to search
imported>Zumbs (Added warning that pow does not compile) |
imported>Zumbs (added FOSE workaround for missing pow function) |
||
Line 17: | Line 17: | ||
*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. | *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. | *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 [http://fose.silverlock.org/fose_command_doc.html#Exp 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== | ==See Also== |
Revision as of 17:45, 15 September 2009
Description
Pow When given two numbers will return the value of the first to the power of the second.
WARNING: This function does not work. When used in the GECK, the script compiler throws the error Syntax Error. Unknown command 'pow', as noted in this thread.
Syntax
pow x y will return x^y
pow x .5 will return the square root of x
Examples
None, yet.
Notes
- 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
- Abs
- Cos
- Log
- Sin
- Tan
- Link to TES4 Construction Set Wiki: Acos (OBSE function)
- Link to TES4 Construction Set Wiki: Cos (OBSE function)
Reference
None, yet.