Table of Contents

Class Vector3

Namespace
NominalSystems.Maths
Assembly
NominalSystems.Maths.dll

[NominalSystems] A semi-major vector 3

public sealed class Vector3
Inheritance
Vector3

Constructors

Vector3()

Default constructor

public Vector3()

Vector3(Vector2, double)

Default constructor

public Vector3(Vector2 xy, double z)

Parameters

xy Vector2

x,y value

z double

z value

Vector3(Vector3)

Default constructor

public Vector3(Vector3 xyz)

Parameters

xyz Vector3

x,y,z value

Vector3(double)

Default constructor

public Vector3(double xyz)

Parameters

xyz double

x,y,z value

Vector3(double, Vector2)

Default constructor

public Vector3(double x, Vector2 yz)

Parameters

x double

x value

yz Vector2

y,z value

Vector3(double, double, double)

Default constructor

public Vector3(double x, double y, double z)

Parameters

x double

x value

y double

y value

z double

z value

Vector3(double[])

Default constructor

public Vector3(double[] array)

Parameters

array double[]

Array value of xyz

Properties

Forward

[Static] The Forward unit 'Vector3'

public static Vector3 Forward { get; }

Property Value

Vector3

this[int]

Get/Set 'Matrix3' data

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

Parameters

i int

index

Property Value

double

this[uint]

Get/Set 'Matrix3' data

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

Parameters

i uint

index

Property Value

double

Right

[Static] The Right unit 'Vector3'

public static Vector3 Right { get; }

Property Value

Vector3

Size

The total size

public uint Size { get; }

Property Value

uint

Up

[Static] The Up unit 'Vector3'

public static Vector3 Up { get; }

Property Value

Vector3

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

AngleDegrees(Vector3, Vector3)

Calculate angle between 2 'Vector3' (degrees)

public static double AngleDegrees(Vector3 a, Vector3 b)

Parameters

a Vector3
b Vector3

Returns

double

AngleRadians(Vector3, Vector3)

Calculate angle between 2 'Vector3' (radians)

public static double AngleRadians(Vector3 a, Vector3 b)

Parameters

a Vector3
b Vector3

Returns

double

Clear()

Clears all values from the data and sets the values to 0.0.

public void Clear()

Cross(Vector3, Vector3)

Calculate cross product of 'Vector3'

public static Vector3 Cross(Vector3 a, Vector3 b)

Parameters

a Vector3
b Vector3

Returns

Vector3

Direction(Vector3, Vector3)

Calculate the unit vector pointing from a to b

public static Vector3 Direction(Vector3 a, Vector3 b)

Parameters

a Vector3
b Vector3

Returns

Vector3

Distance(Vector3, Vector3)

Calculate distance between 2 'Vector3'

public static double Distance(Vector3 a, Vector3 b)

Parameters

a Vector3
b Vector3

Returns

double

Dot(Vector3, Vector3)

Calculate dot product of 'Vector3'

public static double Dot(Vector3 a, Vector3 b)

Parameters

a Vector3
b Vector3

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

Is 'Vector3' not a number

public static bool IsNaN(Vector3 a)

Parameters

a Vector3

Returns

bool

IsZero(Vector3)

Is 'Vector3' zero

public static bool IsZero(Vector3 a)

Parameters

a Vector3

Returns

bool

Lerp(Vector3, Vector3, double)

Linear Interpolates between two vectors based on an alpha between 0 and 1.

public static Vector3 Lerp(Vector3 a, Vector3 b, double alpha)

Parameters

a Vector3

The first vector

b Vector3

The second vector

alpha double

The value between 0 and 1 to lerp between the first and second vector

Returns

Vector3

The Interpolated Vector

Lerp(Vector3, Vector3, double, double, double)

Linear Interpolates between two vectors based on an alpha between 0 and 1.

public static Vector3 Lerp(Vector3 a, Vector3 b, double time_a, double time_b, double time_current)

Parameters

a Vector3

The first vector

b Vector3

The second vector

time_a double

The time of the first vector

time_b double

The time of the second vector

time_current double

The current time to interpolate between

Returns

Vector3

The Interpolated Vector

Offset(Vector3, Vector3)

Calculate the vector from a to b

public static Vector3 Offset(Vector3 a, Vector3 b)

Parameters

a Vector3
b Vector3

Returns

Vector3

OuterProduct(Vector3, Vector3)

Calculate outer product of 2 'Vector3'

public static Matrix3 OuterProduct(Vector3 a, Vector3 b)

Parameters

a Vector3
b Vector3

Returns

Matrix3

ToString()

public override string ToString()

Returns

string

ToString(string)

Prints the Vector to a string with some default formatting

public string ToString(string format = "0.0000")

Parameters

format string

The formatting of the string

Returns

string

The string from the vector

Operators

operator +(Vector3, Vector3)

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

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

Parameters

a Vector3
b Vector3

Returns

Vector3

operator +(Vector3, double)

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

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

Parameters

a Vector3
b double

Returns

Vector3

operator +(double, Vector3)

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

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

Parameters

a double
b Vector3

Returns

Vector3

operator /(Vector3, Vector3)

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

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

Parameters

a Vector3
b Vector3

Returns

Vector3

operator /(Vector3, double)

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

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

Parameters

a Vector3
b double

Returns

Vector3

operator /(double, Vector3)

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

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

Parameters

a double
b Vector3

Returns

Vector3

operator ==(Vector3, Vector3)

'Vector3' == 'Vector3' = 'bool'

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

Parameters

a Vector3
b Vector3

Returns

bool

operator >(Vector3, Vector3)

'Vector3' > 'Vector3' = 'bool'

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

Parameters

a Vector3
b Vector3

Returns

bool

operator >(Vector3, double)

'Vector3' > 'Vector3' = 'bool'

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

Parameters

a Vector3
b double

Returns

bool

operator >(double, Vector3)

'Vector3' > 'Vector3' = 'bool'

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

Parameters

a double
b Vector3

Returns

bool

implicit operator Vector3(Vector)

Implicit cast 'Vector' to 'Vector3'

public static implicit operator Vector3(Vector a)

Parameters

a Vector

Returns

Vector3

implicit operator Vector(Vector3)

Implicit cast 'Vector3' to 'Vector'

public static implicit operator Vector(Vector3 a)

Parameters

a Vector3

Returns

Vector

implicit operator Vector3(double[])

Implicit cast 'Vector3' to 'Vector'

public static implicit operator Vector3(double[] a)

Parameters

a double[]

Returns

Vector3

operator !=(Vector3, Vector3)

'Vector3' != 'Vector3' = 'bool'

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

Parameters

a Vector3
b Vector3

Returns

bool

operator <(Vector3, Vector3)

'Vector3' < 'Vector3' = 'bool'

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

Parameters

a Vector3
b Vector3

Returns

bool

operator <(Vector3, double)

'double' < 'Vector3' = 'bool'

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

Parameters

a Vector3
b double

Returns

bool

operator <(double, Vector3)

'double' < 'Vector3' = 'bool'

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

Parameters

a double
b Vector3

Returns

bool

operator *(Vector3, Vector3)

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

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

Parameters

a Vector3
b Vector3

Returns

Vector3

operator *(Vector3, double)

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

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

Parameters

a Vector3
b double

Returns

Vector3

operator *(double, Vector3)

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

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

Parameters

a double
b Vector3

Returns

Vector3

operator -(Vector3, Vector3)

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

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

Parameters

a Vector3
b Vector3

Returns

Vector3

operator -(Vector3, double)

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

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

Parameters

a Vector3
b double

Returns

Vector3

operator -(double, Vector3)

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

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

Parameters

a double
b Vector3

Returns

Vector3

operator -(Vector3)

Returns the negation of a 'Vector'

public static Vector3 operator -(Vector3 a)

Parameters

a Vector3

Returns

Vector3