Skip to main content

Home > blockly > utils > Coordinate > translate

utils.Coordinate.translate() method

Translates this coordinate by the given offsets. respectively.

Signature:

translate(tx: number, ty: number): Coordinate;

Parameters

ParameterTypeDescription
txnumberThe value to translate x by.
tynumberThe value to translate y by.

Returns:

Coordinate

This coordinate after translating.