From 5b14e196d0e7629bb682ad539d2d333a7e5ba700 Mon Sep 17 00:00:00 2001 From: Ilya Taratukhin Date: Mon, 16 Feb 2015 18:08:57 +0500 Subject: [PATCH] Don't need ternary operator here --- JavaScript/QuadTree/src/QuadTree.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/JavaScript/QuadTree/src/QuadTree.js b/JavaScript/QuadTree/src/QuadTree.js index 71bb19e..b27c4ee 100644 --- a/JavaScript/QuadTree/src/QuadTree.js +++ b/JavaScript/QuadTree/src/QuadTree.js @@ -186,8 +186,8 @@ Node.prototype._findIndex = function (item) { var b = this._bounds; - var left = (item.x > b.x + b.width / 2) ? false : true; - var top = (item.y > b.y + b.height / 2) ? false : true; + var left = (item.x <= b.x + b.width / 2); + var top = (item.y <= b.y + b.height / 2); //top left var index = Node.TOP_LEFT;