Module: Pair

Utilities for handling 2D vectors, expressed a two-elements list
Source:

Methods

(inner) diff(x1, y1, x2, y2) → {Pair}

Calculates the difference of two vectors
Parameters:
Name Type Description
x1 number
y1 number
x2 number
y2 number
Source:
Returns:
Type
Pair

(inner) equal(x1, y1, x2, y2, deltaopt) → {boolean}

Parameters:
Name Type Attributes Default Description
x1 number
y1 number
x2 number
y2 number
delta number <optional>
0 tolerance in comparison
Source:
Returns:
Type
boolean

(inner) isNull(x, y) → {boolean}

Tells whether this pair is (0, 0)
Parameters:
Name Type Description
x number
y number
Source:
Returns:
Type
boolean