Determine whether a point is on any edge

Including diagonals.