Table of Contents

Class VectorOf<T>

Namespace
H.Extensions.Unit
Assembly
H.Extensions.Unit.dll

Structure to represent vector quantities, such as Displacement, Velocity or Force.

public class VectorOf<T> where T : IPhysicalQuantity, new()

Type Parameters

T

A physical quantity, such as length.

Inheritance
VectorOf<T>
Inherited Members
Extension Methods

Constructors

VectorOf(double, double, double, Dimensions)

public VectorOf(double x, double y, double z, Dimensions dimensions)

Parameters

x double
y double
z double
dimensions Dimensions

VectorOf(T, Angle)

public VectorOf(T magnitude, Angle direction)

Parameters

magnitude T
direction Angle

VectorOf(T, Angle, Angle)

public VectorOf(T magnitude, Angle inclination, Angle azimuth)

Parameters

magnitude T
inclination Angle
azimuth Angle

VectorOf(T, T, T)

public VectorOf(T x, T y, T z)

Parameters

x T
y T
z T

Fields

X

public PhysicalQuantity X

Field Value

PhysicalQuantity

Y

public PhysicalQuantity Y

Field Value

PhysicalQuantity

Z

public PhysicalQuantity Z

Field Value

PhysicalQuantity

Properties

Azimuth

public Angle Azimuth { get; }

Property Value

Angle

Direction

Direction is the same as Azimuth

public Angle Direction { get; }

Property Value

Angle

Inclination

public Angle Inclination { get; }

Property Value

Angle

Magnitude

public PhysicalQuantity Magnitude { get; }

Property Value

PhysicalQuantity

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

operator +(VectorOf<T>, VectorOf<T>)

public static VectorOf<T> operator +(VectorOf<T> v1, VectorOf<T> v2)

Parameters

v1 VectorOf<T>
v2 VectorOf<T>

Returns

VectorOf<T>

operator *(VectorOf<T>, double)

public static VectorOf<T> operator *(VectorOf<T> v1, double v2)

Parameters

v1 VectorOf<T>
v2 double

Returns

VectorOf<T>

operator *(double, VectorOf<T>)

public static VectorOf<T> operator *(double v1, VectorOf<T> v2)

Parameters

v1 double
v2 VectorOf<T>

Returns

VectorOf<T>

operator -(VectorOf<T>, VectorOf<T>)

public static VectorOf<T> operator -(VectorOf<T> v1, VectorOf<T> v2)

Parameters

v1 VectorOf<T>
v2 VectorOf<T>

Returns

VectorOf<T>