Class: DefLengthSquared

algeobra~DefLengthSquared()

Definition of the squared length of a vector or between two points

Constructor

new DefLengthSquared()

Source:

Methods

compute(createInfo) → {Object}

Computes the squared length
Parameters:
Name Type Description
createInfo CreateInfo The creation info
Source:
Returns:
The squared length as a TYPE_NUMBER
Type
Object

(static) fromPoints(p0, p1) → {CreateInfo}

Compute squared distance between two points
Parameters:
Name Type Description
p0 Number | Object Either the index or value of a TYPE_POINT. The first point
p1 Number | Object Either the index or value of a TYPE_POINT. The second point
Source:
Returns:
The creation info
Type
CreateInfo

(static) fromVectorOrLine(v) → {CreateInfo}

Compute squared langth of a vector or the two points specifying a line
Parameters:
Name Type Description
v Number | Object Either the index or value of an object of one of [TYPE_VECTOR, TYPE_LINE]
Source:
Returns:
The creation info
Type
CreateInfo