blockly > utils > Coordinate > translate
utils.Coordinate.translate() method
Translates this coordinate by the given offsets. respectively.
Signature:
translate(tx: number, ty: number): Coordinate;
Parameters
Parameter | Type | Description |
---|---|---|
tx | number | The value to translate x by. |
ty | number | The value to translate y by. |
Returns:
This coordinate after translating.