diff --git a/src/basic/Rectangle.js b/src/basic/Rectangle.js index 300f7c76..4e07e0cb 100644 --- a/src/basic/Rectangle.js +++ b/src/basic/Rectangle.js @@ -118,13 +118,13 @@ Rectangle = Base.extend({ }, getCenter: function() { - return new Point(this.x - this.width / 2, this.y - this.height / 2); + return new Point(this.x + this.width * 0.5, this.y + this.height * 0.5); }, setCenter: function() { var center = Point.read(arguments); - this.x = center.x - this.width / 2; - this.y = center.y - this.height / 2; + this.x = center.x - this.width * 0.5; + this.y = center.y - this.height * 0.5; }, getTopLeft: function() {