Embody


Vector3 Module

A module which implements vector operations.

Functions and values

Function or value Description

cross left right

Full Usage: cross left right

Parameters:
Returns: NumericalVector3<MeasureProduct<'v, MeasureProduct<'u, MeasureOne>>>
Modifiers: inline
Type parameters: 'u, 'v

Compute a cross product of 2 vectors. Vectors can have different units of measure.

left : NumericalVector3<'u>
right : NumericalVector3<'v>
Returns: NumericalVector3<MeasureProduct<'v, MeasureProduct<'u, MeasureOne>>>

dot left right

Full Usage: dot left right

Parameters:
Returns: float<MeasureProduct<'v, MeasureProduct<'u, MeasureOne>>>
Modifiers: inline
Type parameters: 'u, 'v

Compute a dot product of 2 vectors. Vectors can have different units of measure.

left : NumericalVector3<'u>
right : NumericalVector3<'v>
Returns: float<MeasureProduct<'v, MeasureProduct<'u, MeasureOne>>>

length vector

Full Usage: length vector

Parameters:
Returns: float<'u>
Modifiers: inline
Type parameters: 'u

Compute length (magnitude) of a vector.

vector : NumericalVector3<'u>
Returns: float<'u>

squaredLength vector

Full Usage: squaredLength vector

Parameters:
Returns: float<MeasureProduct<MeasureProduct<'u, 'u>, MeasureOne>>
Modifiers: inline
Type parameters: 'u

Compute squared length (squared magnitude) of a vector.

vector : NumericalVector3<'u>
Returns: float<MeasureProduct<MeasureProduct<'u, 'u>, MeasureOne>>

strip vector

Full Usage: strip vector

Parameters:
Returns: NumericalVector3<MeasureOne>
Modifiers: inline
Type parameters: 'u

Return a unitless vector, i.e. stripped of its unit of measure.

vector : NumericalVector3<'u>
Returns: NumericalVector3<MeasureOne>

zero ()

Full Usage: zero ()

Parameters:
    () : unit

Returns: NumericalVector3<'u>

Return a zero vector, with a desired unit of measure.

() : unit
Returns: NumericalVector3<'u>