Blockly pindah ke Raspberry Pi Foundation pada 10 November 2025! Baca
postingan blog
dan
FAQ.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
blockly > utils > Koordinasi > jumlah
Metode utils.Coordinate.sum()
Menampilkan jumlah dua koordinat sebagai Koordinat baru.
Tanda Tangan:
static sum(a: Coordinate | SVGPoint, b: Coordinate | SVGPoint): Coordinate;
Parameter
| Parameter |
Jenis |
Deskripsi |
| a |
Koordinasi | SVGPoint |
Koordinat x/y. |
| b |
Koordinasi | SVGPoint |
Koordinat x/y. |
Hasil:
Koordinasi
Koordinat yang mewakili jumlah dari dua koordinat.
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-25 UTC.
[null,null,["Terakhir diperbarui pada 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"]]