Table of Contents

Class Vector2

Namespace
NominalSystems.Maths
Assembly
NominalSystems.Maths.dll

[NominalSystems] A semi-major vector 2

public sealed class Vector2
Inheritance
Vector2

Constructors

Vector2()

Default constructor

public Vector2()

Vector2(Vector2)

Default constructor

public Vector2(Vector2 xy)

Parameters

xy Vector2

x,y value

Vector2(double)

Default constructor

public Vector2(double xy)

Parameters

xy double

x,y value

Vector2(double, double)

Default constructor

public Vector2(double x, double y)

Parameters

x double

x value

y double

y Value

Fields

X

1st value in vector

public double X

Field Value

double

Y

2nd value in vector

public double Y

Field Value

double

Properties

Right

[Static] The Right unit 'Vector2'

public static Vector2 Right { get; }

Property Value

Vector2

Up

[Static] The Up unit 'Vector2'

public static Vector2 Up { get; }

Property Value

Vector2

Methods

AngleDegrees(Vector2, Vector2)

Calculate angle between 2 'Vector2' (degrees)

public static double AngleDegrees(Vector2 a, Vector2 b)

Parameters

a Vector2
b Vector2

Returns

double

AngleRadians(Vector2, Vector2)

Calculate angle between 2 'Vector2' (radians)

public static double AngleRadians(Vector2 a, Vector2 b)

Parameters

a Vector2
b Vector2

Returns

double

Distance(Vector2, Vector2)

Calculate distance between 2 'Vector2'

public static double Distance(Vector2 a, Vector2 b)

Parameters

a Vector2
b Vector2

Returns

double

Dot(Vector2, Vector2)

Calculate dot product of 'Vector2'

public static double Dot(Vector2 a, Vector2 b)

Parameters

a Vector2
b Vector2

Returns

double

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(object, double)

Determine whether the specified object is equal to the current matrix, with some specified precision

public bool Equals(object obj, double precision)

Parameters

obj object

The object to compare with the current object

precision double

The precision within which values are considered equal

Returns

bool

true if the specified object is equal to the current object; otherwise, false

GetHashCode()

public override int GetHashCode()

Returns

int

IsNaN(Vector2)

Is 'Vector2' not a number

public static bool IsNaN(Vector2 a)

Parameters

a Vector2

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator +(Vector2, Vector2)

Returns the addition of a 'Vector' with a 'Vector'

public static Vector2 operator +(Vector2 a, Vector2 b)

Parameters

a Vector2
b Vector2

Returns

Vector2

operator +(Vector2, double)

Returns the addition of a 'Vector' with a 'double'

public static Vector2 operator +(Vector2 a, double b)

Parameters

a Vector2
b double

Returns

Vector2

operator +(double, Vector2)

Returns the addition of a 'double' with a 'Vector'

public static Vector2 operator +(double a, Vector2 b)

Parameters

a double
b Vector2

Returns

Vector2

operator /(Vector2, Vector2)

Returns the division of a 'Vector' with a 'Vector'

public static Vector2 operator /(Vector2 a, Vector2 b)

Parameters

a Vector2
b Vector2

Returns

Vector2

operator /(Vector2, double)

Returns the division of a 'Vector' with a 'double'

public static Vector2 operator /(Vector2 a, double b)

Parameters

a Vector2
b double

Returns

Vector2

operator /(double, Vector2)

Returns the division of a 'double' with a 'Vector'

public static Vector2 operator /(double a, Vector2 b)

Parameters

a double
b Vector2

Returns

Vector2

operator ==(Vector2, Vector2)

'Vector2' == 'Vector2' = 'bool'

public static bool operator ==(Vector2 a, Vector2 b)

Parameters

a Vector2
b Vector2

Returns

bool

explicit operator Vector2(Vector)

Explicit cast 'Vector' to 'Vector2'

public static explicit operator Vector2(Vector a)

Parameters

a Vector

Returns

Vector2

operator >(Vector2, Vector2)

'Vector2' > 'Vector2' = 'bool'

public static bool operator >(Vector2 a, Vector2 b)

Parameters

a Vector2
b Vector2

Returns

bool

operator >(Vector2, double)

'Vector2' > 'Vector2' = 'bool'

public static bool operator >(Vector2 a, double b)

Parameters

a Vector2
b double

Returns

bool

operator >(double, Vector2)

'Vector2' > 'Vector2' = 'bool'

public static bool operator >(double a, Vector2 b)

Parameters

a double
b Vector2

Returns

bool

implicit operator Vector(Vector2)

Implicit cast 'Vector2' to 'Vector'

public static implicit operator Vector(Vector2 a)

Parameters

a Vector2

Returns

Vector

operator !=(Vector2, Vector2)

'Vector2' != 'Vector2' = 'bool'

public static bool operator !=(Vector2 a, Vector2 b)

Parameters

a Vector2
b Vector2

Returns

bool

operator <(Vector2, Vector2)

'Vector2' < 'Vector2' = 'bool'

public static bool operator <(Vector2 a, Vector2 b)

Parameters

a Vector2
b Vector2

Returns

bool

operator <(Vector2, double)

'double' < 'Vector2' = 'bool'

public static bool operator <(Vector2 a, double b)

Parameters

a Vector2
b double

Returns

bool

operator <(double, Vector2)

'double' < 'Vector2' = 'bool'

public static bool operator <(double a, Vector2 b)

Parameters

a double
b Vector2

Returns

bool

operator *(Vector2, Vector2)

Returns the multiplication of a 'Vector' with a 'Vector'

public static Vector2 operator *(Vector2 a, Vector2 b)

Parameters

a Vector2
b Vector2

Returns

Vector2

operator *(Vector2, double)

Returns the multiplication of a 'Vector' with a 'double'

public static Vector2 operator *(Vector2 a, double b)

Parameters

a Vector2
b double

Returns

Vector2

operator *(double, Vector2)

Returns the multiplication of a 'double' with a 'Vector'

public static Vector2 operator *(double a, Vector2 b)

Parameters

a double
b Vector2

Returns

Vector2

operator -(Vector2, Vector2)

Returns the subtraction of a 'Vector' with a 'Vector'

public static Vector2 operator -(Vector2 a, Vector2 b)

Parameters

a Vector2
b Vector2

Returns

Vector2

operator -(Vector2, double)

Returns the subtraction of a 'Vector' with a 'double'

public static Vector2 operator -(Vector2 a, double b)

Parameters

a Vector2
b double

Returns

Vector2

operator -(double, Vector2)

Returns the subtraction of a 'double' with a 'Vector'

public static Vector2 operator -(double a, Vector2 b)

Parameters

a double
b Vector2

Returns

Vector2

operator -(Vector2)

Returns the negation of a 'Vector'

public static Vector2 operator -(Vector2 a)

Parameters

a Vector2

Returns

Vector2