IVec4Ops

Description

[StaticTemplate]
interface Tinman.Core.Math.Vectors.IVec4Ops
<TVector val : IVec4Ops<TVector, TCoord>>
<TCoord val>

Derived from

IVecOps<TVector, TCoord>

Extended by

Vec4D struct
Vec4F struct
Vec4I struct
Vec4L struct

Defines common operations for 4D vector types.

Public / Methods

Add


[Pure]
public method Add → (4)

in : TCoord

X-component of vector.

in : TCoord

Y-component of vector.

in : TCoord

Z-component of vector.

in : TCoord

W-component of vector.

returns → TVector

The resulting vector.

Adds this vector and the given one (component-wise).

Dot


[Pure]
public method Dot → (4)

in : TCoord

X-component of vector.

in : TCoord

Y-component of vector.

in : TCoord

Z-component of vector.

in : TCoord

W-component of vector.

returns → TCoord

The resulting vector.

Computes the dot product between this vector and the given one.

Equals


[Pure]
public method Equals → (4)

in : TCoord

X-component of vector.

in : TCoord

Y-component of vector.

in : TCoord

Z-component of vector.

in : TCoord

W-component of vector.

returns → bool

true if both vectors are equal, false if they are not.

Checks if this vector and the given one are equal.

Equals​Almost


[Pure]
public method EqualsAlmost → (4)

in : TCoord

X-component of vector.

in : TCoord

Y-component of vector.

in : TCoord

Z-component of vector.

in : TCoord

W-component of vector.

returns → bool

true if both vectors are similar, false if they are not.

Checks if this vector and the given one are similar but necessarily equal.

Vectors with an integral component type will delegate to Equals.

See also

Maths.Similar2

Max


[Pure]
public method Max → (4)

in : TCoord

X-component of vector.

in : TCoord

Y-component of vector.

in : TCoord

Z-component of vector.

in : TCoord

W-component of vector.

returns → TVector

The resulting vector.

Computes the maximum of this vector and the given one (component-wise).

Min


[Pure]
public method Min → (4)

in : TCoord

X-component of vector.

in : TCoord

Y-component of vector.

in : TCoord

Z-component of vector.

in : TCoord

W-component of vector.

returns → TVector

The resulting vector.

Computes the minimum of this vector and the given one (component-wise).

Mul


[Pure]
public method Mul → (4)

in : TCoord

X-component of vector.

in : TCoord

Y-component of vector.

in : TCoord

Z-component of vector.

in : TCoord

W-component of vector.

returns → TVector

The resulting vector.

Multiplies this vector with the given one (component-wise).

Sub


[Pure]
public method Sub → (4)

in : TCoord

X-component of vector.

in : TCoord

Y-component of vector.

in : TCoord

Z-component of vector.

in : TCoord

W-component of vector.

returns → TVector

The resulting vector.

Subtracts the given vector from this one (component-wise).