Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
blockly > utils > Koordinaten > Summe
Methode utils.Coordinate.sum()
Gibt die Summe der beiden Koordinaten als neue Koordinaten zurück.
Unterschrift:
static sum(a: Coordinate | SVGPoint, b: Coordinate | SVGPoint): Coordinate;
Parameter
Parameter |
Typ |
Beschreibung |
a |
Koordinaten | SVGPoint |
Eine x/y-Koordinate. |
b |
Koordinaten | SVGPoint |
Eine x/y-Koordinate. |
Gibt zurück:
Koordinaten
Eine Koordinate, die die Summe der beiden Koordinaten darstellt.
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-25 (UTC).
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Benötigte Informationen nicht gefunden","missingTheInformationINeed","thumb-down"],["Zu umständlich/zu viele Schritte","tooComplicatedTooManySteps","thumb-down"],["Nicht mehr aktuell","outOfDate","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Problem mit Beispielen/Code","samplesCodeIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 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"]]