Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
blockly > utils > Koordinatör > toplam
utils.coordinate.sum() yöntemi
Yeni bir Koordinat olarak iki koordinatların toplamını döndürür.
İmza:
static sum(a: Coordinate | SVGPoint, b: Coordinate | SVGPoint): Coordinate;
Parametreler
Şunu döndürür:
Koordinatör
İki koordinatların toplamını temsil eden bir Koordinat.
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-25 UTC.
[null,null,["Son güncelleme tarihi: 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"]]