blockly > utils > Coordinate
utils.Coordinate class
Class for representing coordinates and positions.
Signature:
export declare class Coordinate
Constructors
Constructor | Modifiers | Description |
|---|---|---|
Constructs a new instance of the |
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
number | |||
number |
Methods
Method | Modifiers | Description |
|---|---|---|
Creates a new copy of this coordinate. | ||
| Returns the difference between two coordinates as a new Coordinate. | |
| Returns the distance between two coordinates. | |
| Compares coordinates for equality. | |
| Returns the magnitude of a coordinate. | |
Scales this coordinate by the given scale factor. | ||
| Returns the sum of two coordinates as a new Coordinate. | |
Translates this coordinate by the given offsets. respectively. |