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/04/20 19:58] – [Significant square roots and logarithms] korshun | math [2019/07/04 20:44] – [AnglesToVector] korshun | ||
---|---|---|---|
Line 292: | Line 292: | ||
Converts the vector' | Converts the vector' | ||
- | <note important> | + | <note important> |
=== Example usage === | === Example usage === | ||
Line 305: | Line 305: | ||
int pitch = r2; | int pitch = r2; | ||
SetActorAngle(tid, | SetActorAngle(tid, | ||
- | SetActorPitch(tid, | + | SetActorPitch(tid, |
} | } | ||
</ | </ | ||
Line 314: | Line 314: | ||
Converts a pair of angles (angle, pitch) to a 3D vector of length '' | Converts a pair of angles (angle, pitch) to a 3D vector of length '' | ||
- | <note important> | + | <note important> |
+ | |||
+ | === Example usage === | ||
+ | |||
+ | < | ||
+ | AnglesToVector(GetActorAngle(0), | ||
+ | int dirX = r1; | ||
+ | int dirY = r2; | ||
+ | int dirZ = r3; | ||
+ | </ | ||
+ | |||
===== Logarithms ===== | ===== Logarithms ===== | ||
Line 347: | Line 358: | ||
<note important> | <note important> | ||
- | <note important> | + | <note important> |
Note that even the integer version has a fixed-point base. | Note that even the integer version has a fixed-point base. | ||