Table of Contents

Class Vector4

Namespace
NominalSystems.Maths
Assembly
NominalSystems.Maths.dll

[NominalSystems] A semi-major vector 4

public sealed class Vector4
Inheritance
Vector4

Constructors

Vector4()

Default constructor

public Vector4()

Vector4(Vector2, Vector2)

Default constructor

public Vector4(Vector2 xy, Vector2 zw)

Parameters

xy Vector2

x,y value

zw Vector2

z,w values

Vector4(Vector2, double, double)

Default constructor

public Vector4(Vector2 xy, double z, double w)

Parameters

xy Vector2

x,y value

z double

z value

w double

w value

Vector4(Vector3, double)

Default constructor

public Vector4(Vector3 xyz, double w)

Parameters

xyz Vector3

x,y,z values

w double

w value

Vector4(Vector4)

Default constructor

public Vector4(Vector4 xyzw)

Parameters

xyzw Vector4

x,y,z,w value

Vector4(double)

Default constructor

public Vector4(double xyzw)

Parameters

xyzw double

x,y,z,w value

Vector4(double, Vector2, double)

Default constructor

public Vector4(double x, Vector2 yz, double w)

Parameters

x double

x value

yz Vector2

x,z value

w double

w value

Vector4(double, Vector3)

Default constructor

public Vector4(double x, Vector3 yzw)

Parameters

x double

x value

yzw Vector3

y,z,w value

Vector4(double, double, Vector2)

Default constructor

public Vector4(double x, double y, Vector2 zw)

Parameters

x double

x value

y double

y value

zw Vector2

z,w value

Vector4(double, double, double, double)

Default constructor (fast)

public Vector4(double x, double y, double z, double w)

Parameters

x double

x value

y double

y value

z double

z value

w double

w value

Properties

this[uint]

The get/set value accessor

public double this[uint i] { get; set; }

Parameters

i uint

value index

Property Value

double

Size

The total size

public uint Size { get; }

Property Value

uint

W

4th value in vector

public double W { get; set; }

Property Value

double

X

1st value in vector

public double X { get; set; }

Property Value

double

Y

2nd value in vector

public double Y { get; set; }

Property Value

double

Z

3rd value in vector

public double Z { get; set; }

Property Value

double

Methods

Dot(Vector4, Vector4)

Calculate dot product of 'Vector4'

public static double Dot(Vector4 a, Vector4 b)

Parameters

a Vector4
b Vector4

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(Vector4)

Is 'Vector2' not a number

public static bool IsNaN(Vector4 a)

Parameters

a Vector4

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator +(Vector4, Vector4)

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

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

Parameters

a Vector4
b Vector4

Returns

Vector4

operator +(Vector4, double)

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

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

Parameters

a Vector4
b double

Returns

Vector4

operator +(double, Vector4)

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

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

Parameters

a double
b Vector4

Returns

Vector4

operator /(Vector4, Vector4)

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

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

Parameters

a Vector4
b Vector4

Returns

Vector4

operator /(Vector4, double)

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

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

Parameters

a Vector4
b double

Returns

Vector4

operator /(double, Vector4)

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

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

Parameters

a double
b Vector4

Returns

Vector4

operator ==(Vector4, Vector4)

'Vector4' == 'Vector4' = 'bool'

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

Parameters

a Vector4
b Vector4

Returns

bool

operator >(Vector4, Vector4)

'Vector4' > 'Vector4' = 'bool'

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

Parameters

a Vector4
b Vector4

Returns

bool

operator >(Vector4, double)

'Vector4' > 'Vector4' = 'bool'

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

Parameters

a Vector4
b double

Returns

bool

operator >(double, Vector4)

'Vector4' > 'Vector4' = 'bool'

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

Parameters

a double
b Vector4

Returns

bool

implicit operator Vector4(Vector)

Implicit cast 'Vector' to 'Vector4'

public static implicit operator Vector4(Vector a)

Parameters

a Vector

Returns

Vector4

implicit operator Vector(Vector4)

Implicit cast 'Vector4' to 'Vector'

public static implicit operator Vector(Vector4 a)

Parameters

a Vector4

Returns

Vector

operator !=(Vector4, Vector4)

'Vector4' != 'Vector4' = 'bool'

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

Parameters

a Vector4
b Vector4

Returns

bool

operator <(Vector4, Vector4)

'Vector4' < 'Vector4' = 'bool'

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

Parameters

a Vector4
b Vector4

Returns

bool

operator <(Vector4, double)

'double' < 'Vector4' = 'bool'

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

Parameters

a Vector4
b double

Returns

bool

operator <(double, Vector4)

'double' < 'Vector4' = 'bool'

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

Parameters

a double
b Vector4

Returns

bool

operator *(Vector4, Vector4)

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

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

Parameters

a Vector4
b Vector4

Returns

Vector4

operator *(Vector4, double)

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

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

Parameters

a Vector4
b double

Returns

Vector4

operator *(double, Vector4)

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

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

Parameters

a double
b Vector4

Returns

Vector4

operator -(Vector4, Vector4)

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

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

Parameters

a Vector4
b Vector4

Returns

Vector4

operator -(Vector4, double)

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

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

Parameters

a Vector4
b double

Returns

Vector4

operator -(double, Vector4)

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

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

Parameters

a double
b Vector4

Returns

Vector4

operator -(Vector4)

Returns the negation of a 'Vector'

public static Vector4 operator -(Vector4 a)

Parameters

a Vector4

Returns

Vector4