Fixed coordinates being computed incorrectly in some quadrants (I should really read my own javadoc...). Fixes #344.