Skip to content
Will Blanton edited this page Sep 13, 2019 · 3 revisions

A Point containing x and y values as Ints

Examples

var point_a = IntPoint.get(1, 2);
var point_b = IntPoint.get(0, 0);

point_a.set(3, 4); // x: 3, y: 4
point_a.compare(point_b); // false

point_b.copy_from(point_a);
point_a.equals(point_b); // true

point_a += point_b; // x: 6, y: 8
var length = point_a.length; // 10
var distance = point_a.distance(point_b); // 5.385...

// Recycle when done!
point_a.put();
point_b.put();
Clone this wiki locally