Class: VectorMath
Methods
IsZeroVector()
static
IsZeroVector(val
):boolean
Parameters
• val: IVector3
Returns
boolean
SliceLine()
static
SliceLine(start
,end
,sliceLength
?):IVector3
[]
Slices a line into a set of points based on the specified slice length.
Parameters
• start: IVector3
The starting point of the line.
• end: IVector3
The ending point of the line.
• sliceLength?: number
The length of each slice. Defaults to 20.
Returns
IVector3
[]
An array of points that represent the sliced line.
Vector2Distance()
static
Vector2Distance(a
,b
):number
Calculates the distance between two 3D vectors.
Parameters
• a: IVector3
The first vector.
• b: IVector3
The second vector.
Returns
number
The distance between the two vectors.
Vector3Add()
static
Vector3Add(start
,end
): {x
:number
;y
:number
;z
:number
; }
Adds two 3D vectors together.
Parameters
• start: IVector3
The starting vector.
• end: IVector3
The ending vector.
Returns
{x
: number
;y
: number
;z
: number
; }
The sum of the two vectors.
x
x:
number
y
y:
number
z
z:
number
Vector3Distance()
static
Vector3Distance(a
,b
):number
Calculates the distance between two 3D vectors.
Parameters
• a: IVector3
The first vector.