Skip to main content

Home > blockly > utils > Coordinate > difference

utils.Coordinate.difference() method

Returns the difference between two coordinates as a new Coordinate.

Signature:

static difference(a: Coordinate | SVGPoint, b: Coordinate | SVGPoint): Coordinate;

Parameters

ParameterTypeDescription
aCoordinate | SVGPointAn x/y coordinate.
bCoordinate | SVGPointAn x/y coordinate.

Returns:

Coordinate

A Coordinate representing the difference between a and b.