Inherits IEquatable< Vector2 >.
Public Member Functions | |
| Vector2 (float xCoord, float yCoord) | |
| override int | GetHashCode () |
| override bool | Equals (object obj) |
| bool | Equals (Vector2 other) |
| override string | ToString () |
| float | Dot (Vector2 v) |
| Returns the dot product of this Vector2 and Vector2 v. If the vectors are normalized the value will always be between 1 (vectors are the same) and -1 (vectors are opposites). More... | |
| bool | IsZero (float epsilon=0) |
| bool | IsNearlyZero () |
Static Public Member Functions | |
| static implicit | operator Vec2 (Vector2 managedVector) |
| static implicit | operator Vector2 (Vec2 nativeVector) |
| static | operator Vector2 (Vector3 vector) |
| static | operator Vector2 (Vector4 vector) |
| static Vector2 | operator* (Vector2 v, float scale) |
| static Vector2 | operator* (float scale, Vector2 v) |
| static Vector2 | operator/ (Vector2 v, float scale) |
| static Vector2 | operator+ (Vector2 v0, Vector2 v1) |
| static Vector2 | operator- (Vector2 v0, Vector2 v1) |
| static Vector2 | operator- (Vector2 v) |
| static Vector2 | operator! (Vector2 v) |
| static bool | operator== (Vector2 left, Vector2 right) |
| static bool | operator!= (Vector2 left, Vector2 right) |
| static float | Dot (Vector2 a, Vector2 b) |
| Returns the dot product of Vector2 a and b. If the vectors are normalized the value will always be between 1 (vectors are the same) and -1 (vectors are opposites). More... | |
| static Vector2 | Lerp (Vector2 p, Vector2 q, float t) |
| static Vector2 | LerpUnclamped (Vector2 p, Vector2 q, float t) |
| static Vector2 | Slerp (Vector2 p, Vector2 q, float t) |
| static Vector2 | SlerpUnclamped (Vector2 p, Vector2 q, float t) |
| static float | Angle (Vector2 a, Vector2 b) |
| Returns the angle between Vector3 a and Vector3 b in radians. More... | |
Static Public Attributes | |
| static readonly Vector2 | Zero = new Vector2(0, 0) |
| static readonly Vector2 | Up = new Vector2(0, 1) |
| static readonly Vector2 | Down = new Vector2(0, -1) |
| static readonly Vector2 | Left = new Vector2(-1, 0) |
| static readonly Vector2 | Right = new Vector2(1, 0) |
Properties | |
| float | x [get, set] |
| float | y [get, set] |
| float | X [get, set] |
| float | Y [get, set] |
| float | Length [get, set] |
| float | Magnitude [get] |
| float | LengthSquared [get] |
| Vector2 | Normalized [get] |
| Vector2 | Absolute [get] |
| Vector2 | Flipped [get] |
| float | this[int index] [get, set] |
| Gets individual axes by index More... | |
|
inline |
|
inline |
Returns the dot product of Vector2 a and b. If the vectors are normalized the value will always be between 1 (vectors are the same) and -1 (vectors are opposites).
| a | Direction vector a. |
| b | Direction vector b. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline static |
|
inline static |
|
inline static |
|
inline |
|
get |
|
get |
|
get set |
|
get |
|
get |
|
get |
|
get set |
Gets individual axes by index
| index | Index, 0 - 1 where 0 is X and 1 is Y |
|
get set |
|
get set |
|
get set |
|
get set |