AS3 求兩點間的距離不用記公式了
var p1:Point = new Point(10, 8); var p2:Point = new Point(2, 17); trace( Point.distance(p1, p2)); trace(p1.subtract(p2).length);
AS3 求兩點間的距離不用記公式了
var p1:Point = new Point(10, 8); var p2:Point = new Point(2, 17); trace( Point.distance(p1, p2)); trace(p1.subtract(p2).length);