Skip to content
Will Blanton edited this page Jul 27, 2018 · 3 revisions

A Point containing x and y values as Ints

Examples

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
Clone this wiki locally