Bugfix testcase
Fixes #1 - proper trigonometry
Merge branch 'master' into gh-pages