IVec3Ops

Description

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

Derived from

IVecOps<TVector, TCoord>

Extended by

Vec3D struct
Vec3F struct
Vec3I struct
Vec3L struct

Defines common operations for 3D vector types.

Public / Methods

Add


[Pure]
public method Add → (3)

in : TCoord

X-component of vector.

in : TCoord

Y-component of vector.

in : TCoord

Z-component of vector.

returns → TVector

The resulting vector.

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

Cross

2 overloads


[Pure]
public method Cross1 → (1)

in : TVector

The vector.

returns → TVector

The resulting vector.

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


[Pure]
public method Cross2 → (3)

in : TCoord

X-component of vector.

in : TCoord

Y-component of vector.

in : TCoord

Z-component of vector.

returns → TVector

The resulting vector.

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

Dot


[Pure]
public method Dot → (3)

in : TCoord

X-component of vector.

in : TCoord

Y-component of vector.

in : TCoord

Z-component of vector.

returns → TCoord

The resulting vector.

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

Equals


[Pure]
public method Equals → (3)

in : TCoord

X-component of vector.

in : TCoord

Y-component of vector.

in : TCoord

Z-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 → (3)

in : TCoord

X-component of vector.

in : TCoord

Y-component of vector.

in : TCoord

Z-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 → (3)

in : TCoord

X-component of vector.

in : TCoord

Y-component of vector.

in : TCoord

Z-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 → (3)

in : TCoord

X-component of vector.

in : TCoord

Y-component of vector.

in : TCoord

Z-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 → (3)

in : TCoord

X-component of vector.

in : TCoord

Y-component of vector.

in : TCoord

Z-component of vector.

returns → TVector

The resulting vector.

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

Sub


[Pure]
public method Sub → (3)

in : TCoord

X-component of vector.

in : TCoord

Y-component of vector.

in : TCoord

Z-component of vector.

returns → TVector

The resulting vector.

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