Constructor
new DefPoint(x, y)
Default values
Parameters:
Name | Type | Default | Description |
---|---|---|---|
x |
Number | 0 | The x coordinate |
y |
Number | 0 | The y coordinate |
- Source:
Methods
compute(createInfo) → {Object}
Computes the point
Parameters:
Name | Type | Description |
---|---|---|
createInfo |
CreateInfo | The creation info |
- Source:
Returns:
A point of type TYPE_POINT
- Type
- Object
(static) fromAttachedVector(p, v) → {CreateInfo}
Creates a point from a vector attached to a point
Parameters:
Name | Type | Description |
---|---|---|
p |
Number | Object | Either the index or value of a TYPE_POINT |
v |
Number | Object | Either the index or value of a TYPE_VECTOR |
- Source:
Returns:
The creation info
- Type
- CreateInfo
(static) fromCoordinates(params) → {CreateInfo}
Creates a point from coordinates
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
- Source:
Returns:
The creation info
- Type
- CreateInfo
(static) fromPointOrVector(other) → {CreateInfo}
Creates a point from another point or vector.
A point created from a vector is located at the tip of the vector that is placed at its reference point
Parameters:
Name | Type | Description |
---|---|---|
other |
Number | Object | Either the index or value of one of the types [TYPE_POINT, TYPE_VECTOR] |
- Source:
Returns:
The creation info
- Type
- CreateInfo
(static) fromPolar(polar) → {CreateInfo}
Creates a point from a polar coordinates
Parameters:
Name | Type | Description |
---|---|---|
polar |
Number | Object | Either the index or value of a TYPE_POLAR |
- Source:
Returns:
The creation info
- Type
- CreateInfo