Bug 990482 - [Camera][UX] Swipe gesture should work on camera mode switcher

This function is very specific to the context where it's used. If x (same for y) is not equal to this.min.x or this.max.x the function doesn't behave properly. For instance if I pass an x value that it's larger than this.min.x but less than this.max.x it will return 'right' which is not correct. If this function belongs to the prototype it should be more generic otherwise I would move it inside snapToEdge so it cannot be miss used by the user of the module.