In the snapPoint function we have two loops - that should find the minimum delta. This function looks good, but we can change it to one loop, with the same functionality.
From:
@mykyta-rusyn The function doesn't return minDelta. It returns a point with minimum delta. If you find a solution which returns point with minimum delta with a single loop, feel free to create a PR
In the
snapPoint
function we have two loops - that should find the minimum delta. This function looks good, but we can change it to one loop, with the same functionality. From:To: