vector

vector

Source:

Vector

Methods

(static) chebyshev(va, vb) → {number}

Source:

Computes the chebyshev or manhattan distance between two vectors of identical length.

Example
chebyshev( [ 0, 0 ], [ 6, 6 ] );
// -> 6
Parameters:
Name Type Description
va number

the first vector.

vb number

the second vector.

Returns:

chebyshev distance between va and vb.

Type
number

(static) taxicab(va, vb) → {number}

Source:

Computes the taxicab or manhattan distance between two vectors of identical length.

Example
taxicab( [ 0, 0 ], [ 6, 6 ] );
// -> 12
Parameters:
Name Type Description
va number

the first vector.

vb number

the second vector.

Returns:

taxicab distance between va and vb.

Type
number