Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision |
ru:math [2019/04/18 23:29] – [Trigonometry] korshun | ru:math [2019/04/18 23:32] – [RotateVector] korshun |
---|
''fixed VectorLength3D(fixed x, fixed y, fixed z)'' | ''fixed VectorLength3D(fixed x, fixed y, fixed z)'' |
| |
A 3D version of [[zdoom>VectorLength]]. Returns the length of the 3D vector. | Трёхмерная версия [[zdoom>VectorLength]]. Возвращает длину трёхмерного вектора. |
| |
==== dot ==== | ==== dot ==== |
* 3D: ''fixed dot3(fixed x1, fixed y1, fixed z1, fixed x2, fixed y2, fixed z2)'' | * 3D: ''fixed dot3(fixed x1, fixed y1, fixed z1, fixed x2, fixed y2, fixed z2)'' |
| |
Returns the [[wp>dot product]] of two vectors. Shorthand for writing out ''FixedMul(x1, x2) + FixedMul(y1, y2) + ...''. | Возвращает [[wp>dot product|скалярное произведение]] двух векторов. Краткий способ записи ''FixedMul(x1, x2) + FixedMul(y1, y2) + ...''. |
| |
==== normalize ==== | ==== normalize ==== |
* 3D: ''fixed, fixed, fixed normalize3d(fixed x, fixed y, fixed z)'' | * 3D: ''fixed, fixed, fixed normalize3d(fixed x, fixed y, fixed z)'' |
| |
[[wp>Normalized vector|Normalizes]] the vector and returns the result using [[multiple return values]]. | [[wp>Normalized vector|Нормализует]] вектор и возвращает результат, используя [[multiple return values|несколько возвращаемых значений]]. |
| |
=== Example usage === | === Пример использования === |
<code> | <code> |
normalize3d(x, y, z); | normalize3d(x, y, z); |
''fixed, fixed RotateVector(fixed x, fixed y, fixed angle)'' | ''fixed, fixed RotateVector(fixed x, fixed y, fixed angle)'' |
| |
Rotates the vector by the angle and returns the result using [[multiple return values]]. | Поворачивает вектор на указанный угол и возвращает результат, используя [[multiple return values|несколько возвращаемых значений]]. |
| |
=== Example usage === | === Example usage === |