-
Notifications
You must be signed in to change notification settings - Fork 9
IntPoint
Will Blanton edited this page Sep 13, 2019
·
3 revisions
A Point containing x and y values as Ints
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();
For more info, please check out the API: http://01010111.com/zerolib/