From 756c4f37c549b6bf7d15271504b13aaab9fcc68f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sun, 1 May 2011 23:34:00 +0100 Subject: [PATCH] Compress Point#getQuadrant() to one line. --- src/basic/Point.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/basic/Point.js b/src/basic/Point.js index c3e3af8e..e925df35 100644 --- a/src/basic/Point.js +++ b/src/basic/Point.js @@ -177,19 +177,7 @@ var Point = this.Point = Base.extend({ }, getQuadrant: function() { - if (this.x >= 0) { - if (this.y >= 0) { - return 1; - } else { - return 4; - } - } else { - if (this.y >= 0) { - return 2; - } else { - return 3; - } - } + return this.x >= 0 ? this.y >= 0 ? 1 : 4 : this.y >= 0 ? 2 : 3; }, /**