How would you determine if a given point is within the bounding box?
My point is 48.847172 , 2.386597.
Boundingbox:
\"48.7998602295\",
This should be faster.
function doesPointCollide(p,box) {
return !(p.x < box.left || p.x > box.right || p.y > box.bottom || p.y < box.top)
}
If the point is outside any of the dimensions we know that it's not in the bounding box, else it is in the bounding box, so we can ignore negated cases more quickly.