コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ブロックする >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。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 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"]]