-
Notifications
You must be signed in to change notification settings - Fork 9
IntPoint
Will Blanton edited this page Jul 27, 2018
·
3 revisions
A Point containing x and y values as Ints
var point_a = new IntPoint(1, 2);
var point_b = new IntPoint(0, 0);
point_a.set(3, 4); // x: 3, y: 4
point_a.compare(point_b); // false
point_b = point_a.copy();
point_a.compare(point_b); // true
point_a.add_to(point_b); // x: 6, y: 8
var point_c = IntPoint.add(point_a, point_b) // x: 9, y: 12
var point_d:FlxPoint = point_c.to_flx_point();
var point_e:IntPoint = new IntPoint(); // 0, 0
point_e.from_flx_point(point_d); // x: 9, y: 12
For more info, please check out the API: http://01010111.com/zerolib/