Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
math [2019/07/04 20:44] – [AnglesToVector] korshun | math [2019/08/26 21:12] – korshun |
---|
''int ipow(int x, int y)'' | ''int ipow(int x, int y)'' |
| |
Returns x^y. Uses a simple multiplication loop. | Returns x<sup>y</sup>. Uses a simple multiplication loop. |
| |
==== fpow ==== | ==== fpow ==== |
''fixed fpow(fixed x, fixed y)'' | ''fixed fpow(fixed x, fixed y)'' |
| |
returns x^y. Supports powers below ''1.0''. Uses a simple loop with ''FixedMul'' or ''FixedDiv'', depending on whether the power is below ''1.0''. | returns x<sup>y</sup>. Supports powers below ''1.0''. Uses a simple loop with ''FixedMul'' or ''FixedDiv'', depending on whether the power is below ''1.0''. |
| |
| |
Converts the vector's direction to a pair of angles (angle, pitch) and returns them using [[multiple return values]]. | Converts the vector's direction to a pair of angles (angle, pitch) and returns them using [[multiple return values]]. |
| |
<note important>Remember that ZDoom uses negated pitch angles on actors. ACSUtils functions don't invert pitches.</note> | <note important>Remember that ZDoom uses negated pitch angles on actors. ACSUtils functions don't use negated pitches. </note> |
| |
=== Example usage === | === Example usage === |