Members
USE_COMPUTED_ANGLE
When computing an angle choose it
- Source:
USE_LARGER_ANGLE
When computing an angle, if it is smaller than Pi (180°), choose the opposite one
- Source:
USE_SMALLER_ANGLE
When computing an angle, if it is greater than Pi (180°), choose the opposite one
- Source:
Methods
compute(createInfo) → {Object}
Compute the angle
Parameters:
Name | Type | Description |
---|---|---|
createInfo |
CreateInfo | The creation info |
- Source:
Returns:
An angle of type TYPE_ANGLE
- Type
- Object
(static) fromFixedDir(params) → {CreateInfo}
Creates an angle from a fixed direction and a line or vector
Parameters:
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
- Source:
Returns:
The creation info
- Type
- CreateInfo
(static) fromPoints(p0, p1, p2, useAngleopt) → {CreateInfo}
Creates an angle from three points. The angle is measured around the middle one.
The reference point is placed at the middle point
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
p0 |
Number | Object | Either the index or value of a TYPE_POINT | |
p1 |
Number | Object | Either the index or value of a TYPE_POINT | |
p2 |
Number | Object | Either the index or value of a TYPE_POINT | |
useAngle |
Number |
<optional> |
One of the values DefAngle.(USE_SMALLER_ANGLE, USE_COMPUTED_ANGLE, USE_LARGER_ANGLE) |
- Source:
Returns:
The creation info
- Type
- CreateInfo
(static) fromVectorsOrLines(v0, v1, useAngleopt) → {CreateInfo}
Creates an angle from two objects that can each be either lines or vectors.
The reference point is placed where the infinitl lines through the objects intersect
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
v0 |
Number | Object | Either the index or value of one of the types [TYPE_VECTOR, TYPE_LINE] | |
v1 |
Number | Object | Either the index or value of one of the types [TYPE_VECTOR, TYPE_LINE] | |
useAngle |
Number |
<optional> |
One of the values DefAngle.(USE_SMALLER_ANGLE, USE_COMPUTED_ANGLE, USE_LARGER_ANGLE) |
- Source:
Returns:
The creation info
- Type
- CreateInfo