TorqueScript Reference
|
Functions | |
String | Vector2Abs (Vector2 v1, Vector2 v2) |
String | Vector2Add (Vector2 v1, Vector2 v2) |
Float | Vector2AngleBetween (Vector2 v1, Vector2 v2) |
Float | Vector2AngleToPoint (Vector2 p1, Vector2 p2) |
String | Vector2AreaNormalize (Vector2 v1, Vector2 v2) |
Boolean | Vector2Compare (Vector2 p1, Vector2 p2, [Vector2 epsilon=0.0001]?) |
String | Vector2Direction (F32 angle, F32 magnitude) |
Float | Vector2Distance (Vector2 p1, Vector2 p2) |
Float | Vector2Dot (Vector2 v1, Vector2 v2) |
String | Vector2Inverse (Vector2 v1) |
String | Vector2InverseX (Vector2 v1) |
String | Vector2InverseY (Vector2 v1) |
Float | Vector2Length (Vector2 v1) |
String | Vector2Mult (Vector2 v1, Vector2 v2) |
String | Vector2Normalize (Vector2 v1) |
String | Vector2Scale (Vector2 v1, scale) |
String | Vector2Sub (Vector2 v1, Vector2 v2) |
Absolute difference of two 2-vectors
Add two 2-vectors.
Angle between two 2D vectors.
Angle from one point to another.
Normalize Rectangle (two 2D vectors) with relation to each other.
Equality of two 2D Points. Compares points p1 and p2 with optional difference (epsilon).
String Vector2Direction | ( | F32 | angle, |
F32 | magnitude | ||
) |
vector from angle and magnitude. Calculates a direction from an angle and magnitude.
angle | The angle of the direction. |
magnitude | The magnitude of the direction. |
Distance between two 2D Points.
Dot-Product of two 2D vectors.
Inverse of a 2D vector.
Inverse X component of a 2D vector.
Inverse Y component of a 2D vector.
Length of a 2D vector.
Multiply two 2D vectors (Not Dot-Product!)
Normalize a 2D vector.
Scale a 2D vector.