Found a forumla for determining whether a point is within a triangle. This will
help with tiles.