CryEngine.Vector2

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...

Constructor & Destructor Documentation

◆ Vector2()

CryEngine.Vector2.Vector2 ( float xCoord,
float yCoord
)
inline

Member Function Documentation

◆ Angle()

static float CryEngine.Vector2.Angle ( Vector2 a,
Vector2 b
)
inline
static

Returns the angle between Vector3 a and Vector3 b in radians.

Returns
The angle in radians.
Parameters
aThe first Vector3.
bThe second Vector3.

◆ Dot() [1/2]

float CryEngine.Vector2.Dot ( Vector2 v)
inline

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).

Returns
The dot product.
Parameters
vOther direction vector.

◆ Dot() [2/2]

static float CryEngine.Vector2.Dot ( Vector2 a,
Vector2 b
)
inline
static

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).

Returns
The dot product.
Parameters
aDirection vector a.
bDirection vector b.

◆ Equals() [1/2]

override bool CryEngine.Vector2.Equals ( object obj)
inline

◆ Equals() [2/2]

bool CryEngine.Vector2.Equals ( Vector2 other)
inline

◆ GetHashCode()

override int CryEngine.Vector2.GetHashCode ( )
inline

◆ IsNearlyZero()

bool CryEngine.Vector2.IsNearlyZero ( )
inline

◆ IsZero()

bool CryEngine.Vector2.IsZero ( float epsilon = 0)
inline

◆ Lerp()

static Vector2 CryEngine.Vector2.Lerp ( Vector2 p,
Vector2 q,
float t
)
inline
static

◆ LerpUnclamped()

static Vector2 CryEngine.Vector2.LerpUnclamped ( Vector2 p,
Vector2 q,
float t
)
inline
static

◆ operator Vec2()

static implicit CryEngine.Vector2.operator Vec2 ( Vector2 managedVector)
inline
static

◆ operator Vector2() [1/3]

static implicit CryEngine.Vector2.operator Vector2 ( Vec2 nativeVector)
inline
static

◆ operator Vector2() [2/3]

static CryEngine.Vector2.operator Vector2 ( Vector3 vector)
inline
explicit
static

◆ operator Vector2() [3/3]

static CryEngine.Vector2.operator Vector2 ( Vector4 vector)
inline
explicit
static

◆ operator!()

static Vector2 CryEngine.Vector2.operator! ( Vector2 v)
inline
static

◆ operator!=()

static bool CryEngine.Vector2.operator!= ( Vector2 left,
Vector2 right
)
inline
static

◆ operator*() [1/2]

static Vector2 CryEngine.Vector2.operator* ( Vector2 v,
float scale
)
inline
static

◆ operator*() [2/2]

static Vector2 CryEngine.Vector2.operator* ( float scale,
Vector2 v
)
inline
static

◆ operator+()

static Vector2 CryEngine.Vector2.operator+ ( Vector2 v0,
Vector2 v1
)
inline
static

◆ operator-() [1/2]

static Vector2 CryEngine.Vector2.operator- ( Vector2 v0,
Vector2 v1
)
inline
static

◆ operator-() [2/2]

static Vector2 CryEngine.Vector2.operator- ( Vector2 v)
inline
static

◆ operator/()

static Vector2 CryEngine.Vector2.operator/ ( Vector2 v,
float scale
)
inline
static

◆ operator==()

static bool CryEngine.Vector2.operator== ( Vector2 left,
Vector2 right
)
inline
static

◆ Slerp()

static Vector2 CryEngine.Vector2.Slerp ( Vector2 p,
Vector2 q,
float t
)
inline
static

◆ SlerpUnclamped()

static Vector2 CryEngine.Vector2.SlerpUnclamped ( Vector2 p,
Vector2 q,
float t
)
inline
static

◆ ToString()

override string CryEngine.Vector2.ToString ( )
inline

Member Data Documentation

◆ Down

readonly Vector2 CryEngine.Vector2.Down = new Vector2(0, -1)
static

◆ Left

readonly Vector2 CryEngine.Vector2.Left = new Vector2(-1, 0)
static
readonly Vector2 CryEngine.Vector2.Right = new Vector2(1, 0)
static

◆ Up

readonly Vector2 CryEngine.Vector2.Up = new Vector2(0, 1)
static

◆ Zero

readonly Vector2 CryEngine.Vector2.Zero = new Vector2(0, 0)
static

Property Documentation

◆ Absolute

Vector2 CryEngine.Vector2.Absolute
get

◆ Flipped

Vector2 CryEngine.Vector2.Flipped
get

◆ Length

float CryEngine.Vector2.Length
get
set

◆ LengthSquared

float CryEngine.Vector2.LengthSquared
get

◆ Magnitude

float CryEngine.Vector2.Magnitude
get

◆ Normalized

Vector2 CryEngine.Vector2.Normalized
get

◆ this[int index]

float CryEngine.Vector2.this[int index]
get
set

Gets individual axes by index

Parameters
indexIndex, 0 - 1 where 0 is X and 1 is Y
Returns
The axis value

◆ x

float CryEngine.Vector2.x
get
set

◆ X

float CryEngine.Vector2.X
get
set

◆ y

float CryEngine.Vector2.y
get
set

◆ Y

float CryEngine.Vector2.Y
get
set