Struct Vector2
A Vector with two (X and Y) components.
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
Assembly: Inferno.Desktop.dll
Syntax
public struct Vector2 : IEquatable<Vector2>
Constructors
|
Improve this Doc
View Source
Vector2(Single)
Declaration
public Vector2(float value)
Parameters
Type |
Name |
Description |
System.Single |
value |
|
|
Improve this Doc
View Source
Vector2(Single, Single)
Declaration
public Vector2(float x, float y)
Parameters
Type |
Name |
Description |
System.Single |
x |
X component
|
System.Single |
y |
Y component
|
Fields
|
Improve this Doc
View Source
UnitX
Declaration
public static Vector2 UnitX
Field Value
|
Improve this Doc
View Source
UnitY
Declaration
public static Vector2 UnitY
Field Value
|
Improve this Doc
View Source
X
The X component of the vector.
Declaration
Field Value
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
Y
The Y component of the vector
Declaration
Field Value
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
Zero
Declaration
public static Vector2 Zero
Field Value
Properties
|
Improve this Doc
View Source
Magnitude
The magnitude of the vector.
Declaration
public float Magnitude { get; }
Property Value
Type |
Description |
System.Single |
|
Methods
|
Improve this Doc
View Source
Distance(Vector2)
Declaration
public float Distance(Vector2 to)
Parameters
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
Distance(Vector2, Vector2)
Declaration
public static float Distance(Vector2 a, Vector2 b)
Parameters
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
Dot(Vector2)
Declaration
public float Dot(Vector2 b)
Parameters
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
Dot(Vector2, Vector2)
Get the dot product of 2 vectors.
Declaration
public static float Dot(Vector2 a, Vector2 b)
Parameters
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
Equals(Vector2)
Declaration
public bool Equals(Vector2 other)
Parameters
Type |
Name |
Description |
Vector2 |
other |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.ValueType.Equals(System.Object)
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.ValueType.GetHashCode()
|
Improve this Doc
View Source
Length()
Declaration
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
Length(Vector2)
Declaration
public static float Length(Vector2 vector)
Parameters
Type |
Name |
Description |
Vector2 |
vector |
|
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
LengthSquared()
Declaration
public float LengthSquared()
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
LengthSquared(Vector2)
Declaration
public static float LengthSquared(Vector2 vector)
Parameters
Type |
Name |
Description |
Vector2 |
vector |
|
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.ValueType.ToString()
|
Improve this Doc
View Source
Declaration
public static Vector2 Transform(Vector2 position, Matrix matrix)
Parameters
Returns
Operators
|
Improve this Doc
View Source
Addition(Vector2, Vector2)
Declaration
public static Vector2 operator +(Vector2 a, Vector2 b)
Parameters
Returns
|
Improve this Doc
View Source
Addition(Vector2, Int32)
Declaration
public static Vector2 operator +(Vector2 a, int b)
Parameters
Type |
Name |
Description |
Vector2 |
a |
|
System.Int32 |
b |
|
Returns
|
Improve this Doc
View Source
Addition(Vector2, Single)
Declaration
public static Vector2 operator +(Vector2 a, float b)
Parameters
Type |
Name |
Description |
Vector2 |
a |
|
System.Single |
b |
|
Returns
|
Improve this Doc
View Source
Addition(Int32, Vector2)
Declaration
public static Vector2 operator +(int b, Vector2 a)
Parameters
Type |
Name |
Description |
System.Int32 |
b |
|
Vector2 |
a |
|
Returns
|
Improve this Doc
View Source
Addition(Single, Vector2)
Declaration
public static Vector2 operator +(float b, Vector2 a)
Parameters
Type |
Name |
Description |
System.Single |
b |
|
Vector2 |
a |
|
Returns
|
Improve this Doc
View Source
Division(Vector2, Vector2)
Declaration
public static Vector2 operator /(Vector2 a, Vector2 b)
Parameters
Returns
|
Improve this Doc
View Source
Division(Vector2, Int32)
Declaration
public static Vector2 operator /(Vector2 a, int b)
Parameters
Type |
Name |
Description |
Vector2 |
a |
|
System.Int32 |
b |
|
Returns
|
Improve this Doc
View Source
Division(Vector2, Single)
Declaration
public static Vector2 operator /(Vector2 a, float b)
Parameters
Type |
Name |
Description |
Vector2 |
a |
|
System.Single |
b |
|
Returns
|
Improve this Doc
View Source
Division(Int32, Vector2)
Declaration
public static Vector2 operator /(int b, Vector2 a)
Parameters
Type |
Name |
Description |
System.Int32 |
b |
|
Vector2 |
a |
|
Returns
|
Improve this Doc
View Source
Division(Single, Vector2)
Declaration
public static Vector2 operator /(float b, Vector2 a)
Parameters
Type |
Name |
Description |
System.Single |
b |
|
Vector2 |
a |
|
Returns
|
Improve this Doc
View Source
Equality(Vector2, Vector2)
Declaration
public static bool operator ==(Vector2 a, Vector2 b)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Inequality(Vector2, Vector2)
Declaration
public static bool operator !=(Vector2 a, Vector2 b)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Multiply(Vector2, Vector2)
Declaration
public static Vector2 operator *(Vector2 a, Vector2 b)
Parameters
Returns
|
Improve this Doc
View Source
Multiply(Vector2, Int32)
Declaration
public static Vector2 operator *(Vector2 a, int b)
Parameters
Type |
Name |
Description |
Vector2 |
a |
|
System.Int32 |
b |
|
Returns
|
Improve this Doc
View Source
Multiply(Vector2, Single)
Declaration
public static Vector2 operator *(Vector2 a, float b)
Parameters
Type |
Name |
Description |
Vector2 |
a |
|
System.Single |
b |
|
Returns
|
Improve this Doc
View Source
Multiply(Int32, Vector2)
Declaration
public static Vector2 operator *(int b, Vector2 a)
Parameters
Type |
Name |
Description |
System.Int32 |
b |
|
Vector2 |
a |
|
Returns
|
Improve this Doc
View Source
Multiply(Single, Vector2)
Declaration
public static Vector2 operator *(float b, Vector2 a)
Parameters
Type |
Name |
Description |
System.Single |
b |
|
Vector2 |
a |
|
Returns
|
Improve this Doc
View Source
Subtraction(Vector2, Vector2)
Declaration
public static Vector2 operator -(Vector2 a, Vector2 b)
Parameters
Returns
|
Improve this Doc
View Source
Subtraction(Vector2, Int32)
Declaration
public static Vector2 operator -(Vector2 a, int b)
Parameters
Type |
Name |
Description |
Vector2 |
a |
|
System.Int32 |
b |
|
Returns
|
Improve this Doc
View Source
Subtraction(Vector2, Single)
Declaration
public static Vector2 operator -(Vector2 a, float b)
Parameters
Type |
Name |
Description |
Vector2 |
a |
|
System.Single |
b |
|
Returns
|
Improve this Doc
View Source
Subtraction(Int32, Vector2)
Declaration
public static Vector2 operator -(int b, Vector2 a)
Parameters
Type |
Name |
Description |
System.Int32 |
b |
|
Vector2 |
a |
|
Returns
|
Improve this Doc
View Source
Subtraction(Single, Vector2)
Declaration
public static Vector2 operator -(float b, Vector2 a)
Parameters
Type |
Name |
Description |
System.Single |
b |
|
Vector2 |
a |
|
Returns
Implements
System.IEquatable<T>