Vector2¶
struct · namespace Hazel
Constructors¶
Vector2(Vector3)¶
Vector2(float)¶
Vector2(float, float)¶
Fields¶
| Field | Description |
|---|---|
public static Vector2 Down |
|
public static Vector2 Left |
|
public static Vector2 One |
|
public static Vector2 Right |
|
public static Vector2 Up |
|
public float X |
|
public float Y |
|
public static Vector2 Zero |
Methods¶
Apply(Func)¶
Allows you to pass in a delegate that takes in a double to process the vector per axis. i.e. (float.Cos) or a lambda (v => v * 3)
Parameters
| Name | Description |
|---|---|
func |
Delegate 'float' method to act as a scalar to process X and Y |
Clamp(Vector2, Vector2)¶
Distance(Vector2)¶
Distance(Vector2, Vector2)¶
static
Dot(Vector2, Vector2)¶
static
EpsilonEquals(Vector2, Vector2, float)¶
static
EqualEpsilon(Vector2, float)¶
Equals(Vector2)¶
Equals(object?)¶
GetHashCode()¶
Length()¶
Lerp(Vector2, Vector2, float)¶
static
New(Func)¶
Allows you to pass in a delegate that takes in and returns a new Vector processed per axis. i.e. (float.Cos) or a lambda (v => v * 3)
Parameters
| Name | Description |
|---|---|
func |
Delegate 'float' method to act as a scalar to process X and Y |
Normalize()¶
Normalized()¶
ToString()¶
Operators¶
operator !=(Vector2, Vector2)¶
static
operator *(Vector2, Vector2)¶
static
operator *(Vector2, float)¶
static
operator *(float, Vector2)¶
static
operator +(Vector2, Vector2)¶
static
operator +(Vector2, float)¶
static
operator -(Vector2, Vector2)¶
static
operator -(Vector2, float)¶
static
operator -(Vector2)¶
static
operator /(Vector2, Vector2)¶
static
operator /(Vector2, float)¶
static
operator /(float, Vector2)¶
static
operator ==(Vector2, Vector2)¶
static
Source: Hazel/Math/Vector2.cs