diff --git a/.eslintrc b/.eslintrc index 73b137e..b60e867 100644 --- a/.eslintrc +++ b/.eslintrc @@ -10,6 +10,7 @@ rules: - error - always no-return-assign: 0 + one-var: 0 /* no-extra-parens: 1 curly: 0 diff --git a/src/interpolation/interpCommon.js b/src/interpolation/interpCommon.js index 30e81d9..84a0c02 100644 --- a/src/interpolation/interpCommon.js +++ b/src/interpolation/interpCommon.js @@ -38,11 +38,9 @@ export function placeNearToNearestNeighbour (node, nearNeighbour, radius, sample // Determine the closest quadrant if (dist0 == dist180) { - if (dist90 > dist270) { lowBound = highBound = 270; } - else { lowBound = highBound = 90; } + if (dist90 > dist270) { lowBound = highBound = 270; } else { lowBound = highBound = 90; } } else if (dist90 == dist270) { - if (dist0 > dist180) { lowBound = highBound = 180; } - else { lowBound = highBound = 0; } + if (dist0 > dist180) { lowBound = highBound = 180; } else { lowBound = highBound = 0; } } else if (dist0 > dist180) { if (dist90 > dist270) { lowBound = 180; @@ -120,8 +118,7 @@ function binarySearchMin (lb, hb, fn) { if (valLowerHalf > valHigherHalf) { lb = Math.floor((lb + hb) / 2); - } - else if (valLowerHalf < valHigherHalf) { + } else if (valLowerHalf < valHigherHalf) { hb = Math.ceil((lb + hb) / 2); } else { lb += Math.floor(range / 4);