(points, left, right)
| 175 | |
| 176 | // Choose a pivot element of the array |
| 177 | const choosePivot = (points, left, right) => |
| 178 | points[left + ((right - left) >> 1)]; |
| 179 | |
| 180 | // Calculate and return the squared Euclidean distance |
| 181 | const squaredDistance = ([x, y]) => x ** 2 + y ** 2; |