blockly > utils > Coordinate > sum

utils.Coordinate.sum() 方法

返回两个坐标的总和作为新的坐标。

Signature:

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

参数

参数 类型 说明
a 坐标 | SVGPoint x/y 坐标。
b 坐标 | SVGPoint x/y 坐标。

返回

坐标

表示两个坐标总和的坐标。