Members
(constant) arc
Function to create arc equivalent to "new" constructor
- Source:
(constant) CCW :boolean
Global constant CCW defines counter clockwise direction of arc
- Source:
Type:
-
boolean
(constant) CW :boolean
Global constant CW defines clockwise direction of arc
- Source:
Type:
-
boolean
DP_TOL :number
Floating point comparison tolerance.
Default value is 0.000001 (10e-6)
- Source:
Type:
-
number
(constant) line
Function to create line equivalent to "new" constructor
- Source:
(constant) matrix
Function to create matrix equivalent to "new" constructor
- Source:
(constant) ORIENTATION :Object
Defines orientation for face of the polygon: clockwise, counter clockwise
or not orientable in the case of self-intersection
- Source:
Type:
-
Object
(constant) point
Function to create point equivalent to "new" constructor
- Source:
(constant) vector
Function to create vector equivalent to "new" constructor
- Source:
Methods
EQ(x, y) → {boolean}
Returns *true* if two values are equal up to DP_TOL
- Source:
Parameters:
Name | Type | Description |
---|---|---|
x |
number
|
|
y |
number
|
Returns:
- Type:
-
boolean
EQ_0(x, y) → {boolean}
Returns *true* if value comparable to zero
- Source:
Parameters:
Name | Type | Description |
---|---|---|
x |
number
|
|
y |
number
|
Returns:
- Type:
-
boolean
GE(x, y) → {boolean}
Returns *true* if first argument greater than or equal to second argument up to DP_TOL
- Source:
Parameters:
Name | Type | Description |
---|---|---|
x |
number
|
|
y |
number
|
Returns:
- Type:
-
boolean
getTolerance() → {number}
Get floating point comparison tolerance
- Source:
Returns:
- Type:
-
number
GT(x, y) → {boolean}
Returns *true* if first argument greater than second argument up to DP_TOL
- Source:
Parameters:
Name | Type | Description |
---|---|---|
x |
number
|
|
y |
number
|
Returns:
- Type:
-
boolean
inverse(shape, inversion_circle) → {Line|Circle}
Inversion is a transformation of the Euclidean plane that maps generalized circles
(where line is considered as a circle with infinite radius) into generalized circles
See also https://en.wikipedia.org/wiki/Inversive_geometry and
http://mathworld.wolfram.com/Inversion.html
Inversion also may be considered as a reflection of the point in the plane with respect to inversion circle so that R^2 = OP * OP', where
O - center of inversion circle
R - radius of inversion circle
P - point of plane
P' - inversion of the point P
Inversion also may be considered as a reflection of the point in the plane with respect to inversion circle so that R^2 = OP * OP', where
O - center of inversion circle
R - radius of inversion circle
P - point of plane
P' - inversion of the point P
- Source:
Parameters:
Name | Type | Description |
---|---|---|
shape |
Line
|
Circle
|
shape to be transformed |
inversion_circle |
Circle
|
inversion circle |
LE(x, y) → {boolean}
Returns *true* if first argument less than or equal to second argument up to DP_TOL
- Source:
Parameters:
Name | Type | Description |
---|---|---|
x |
number
|
|
y |
number
|
Returns:
- Type:
-
boolean
LT(x, y) → {boolean}
Returns *true* if first argument less than second argument up to DP_TOL
- Source:
Parameters:
Name | Type | Description |
---|---|---|
x |
number
|
|
y |
number
|
Returns:
- Type:
-
boolean
setTolerance(tolerance)
Set new floating point comparison tolerance
- Source:
Parameters:
Name | Type | Description |
---|---|---|
tolerance |
number
|