Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
new:math [2018/02/21 13:05] – korshun | new:math [2018/02/21 13:11] – korshun |
---|
* ''fixed, fixed VectorToAngles(fixed x, fixed y, fixed z)'' -- converts vector to a pair of angles (angle and pitch) | * ''fixed, fixed VectorToAngles(fixed x, fixed y, fixed z)'' -- converts vector to a pair of angles (angle and pitch) |
* ''fixed, fixed RotateVector(fixed x, fixed y, fixed angle)'' -- returns vector rotated by angle | * ''fixed, fixed RotateVector(fixed x, fixed y, fixed angle)'' -- returns vector rotated by angle |
* ''fixed, fixed RotateVectorSC(fixed x, fixed y, fixed sin, fixed cos)'' -- returns vector rotated by sine and cosine of some angle (aka rotation vector). This is useful if you already have the rotation vector. If rotation vector is not normalized, result is multipled by rotation vector's length. | * ''fixed, fixed RotateVectorCS(fixed x, fixed y, fixed rx, fixed ry)'' -- returns vector rotated by another vector's angle. Result is multipled by the second vector's length. If the second vector is normalized, it's a (cos(angle), sin(angle)) vector of rotation angle. |
* ''fixed, fixed RotatePoint(fixed x, fixed y, fixed originX, fixed originY, fixed angle)'' -- returns 2D point rotated by angle around the origin. | * ''fixed, fixed RotatePoint(fixed x, fixed y, fixed originX, fixed originY, fixed angle)'' -- returns 2D point rotated by angle around the origin. |
| |