[engine] update collision detect

This commit is contained in:
2018-02-02 17:30:50 +03:00
parent 6f338584eb
commit f9cb985059
5 changed files with 55 additions and 33 deletions

View File

@@ -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;

View File

@@ -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}}';
}
}