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 座標。 |
傳回:
代表兩個座標總和的座標。