[engine] update collision detect
This commit is contained in:
@@ -18,6 +18,10 @@ class Line {
|
||||
);
|
||||
}
|
||||
|
||||
public function move(point:Point):Line {
|
||||
return new Line(point1.add(point), point2.add(point));
|
||||
}
|
||||
|
||||
public function setLength(value:Float):Line {
|
||||
var center = this.center;
|
||||
var width = point2.x - point1.x;
|
||||
|
||||
@@ -18,6 +18,6 @@ class Point {
|
||||
}
|
||||
|
||||
public function toString():String {
|
||||
return 'Point{x=$x,y=$y}';
|
||||
return 'Point{x=${Math.round(x * 100) / 100},y=${Math.round(y * 100) / 100}}';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user