Blockly は 2025 年 11 月 10 日に Raspberry Pi Foundation に移行しました。ブログ投稿とよくある質問をご覧ください。
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ブロックする >utils >座標 >合計
utils.course.sum() メソッド
2 つの座標の合計を新しい座標として返します。
署名:
static sum(a: Coordinate | SVGPoint, b: Coordinate | SVGPoint): Coordinate;
パラメータ
| パラメータ |
型 |
説明 |
| a |
座標 |SVGPoint |
x/y 座標。 |
| b |
座標 |SVGPoint |
x/y 座標。 |
戻り値:
座標
2 つの座標の合計を表す座標。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[],["The `utils.Coordinate.sum()` method calculates the sum of two coordinates. It accepts two parameters, `a` and `b`, which can each be either a `Coordinate` or an `SVGPoint`. This static method adds the x and y values of the two input coordinates. It returns a new `Coordinate` object that represents the combined sum of the two input coordinates. This allows to easily sum coordinates, no matter their type.\n"]]