Unit tests and bug fixes for trig functions

@kenamarit & I added unit tests for trig functions. We also fixed atan2 which was busted, and made atan/asin/acos/atan2 work with angleMode.