Finally able to remove the hacky border handling

- Instead of onLeft and onRight, use Real Mathematics to solve whether
the line goes around the world