Added isInBounds

I hope this is what you were thinking of.