Module: Vector

This module contains functions for dealing with objects with x and y coordinates that represent or include point data
Source:

Methods

(inner) apply(one, other, f) → {Vector}

Parameters:
Name Type Description
one Vector | number
other Vector | number
f
Source:
Returns:
Type
Vector

(inner) copy(one) → {Vector}

Creates a copy of the given point
Parameters:
Name Type Description
one Vector
Source:
Returns:
Type
Vector

(inner) diff(one, other) → {Pair}

Parameters:
Name Type Description
one Vector
other Vector
Source:
Returns:
;
Type
Pair

(inner) divide(one, other) → {Vector}

Parameters:
Name Type Description
one Vector | number
other Vector | number
Source:
Returns:
Type
Vector

(inner) equal(one, other, deltaopt) → {boolean}

Compares two points
Parameters:
Name Type Attributes Default Description
one Vector
other Vector
delta number <optional>
0 the tolance in comparison
Source:
Returns:
Type
boolean

(inner) max(one, other) → {Vector}

Parameters:
Name Type Description
one Vector | number
other Vector | number
Source:
Returns:
Type
Vector

(inner) min(one, other) → {Vector}

Parameters:
Name Type Description
one Vector | number
other Vector | number
Source:
Returns:
Type
Vector

(inner) minus(one, other) → {Vector}

Parameters:
Name Type Description
one Vector | number
other Vector | number
Source:
Returns:
Type
Vector

(inner) multiply(one, other) → {Vector}

Parameters:
Name Type Description
one Vector | number
other Vector | number
Source:
Returns:
Type
Vector

(inner) plus(one, other) → {Vector}

Parameters:
Name Type Description
one Vector | number
other Vector | number
Source:
Returns:
Type
Vector

(inner) update(vector, x, y)

Parameters:
Name Type Description
vector Vector
x any
y any
Source:

(inner) zero() → {Vector}

Returns a new (0, 0) vector
Source:
Returns:
Type
Vector