Annoyance
Do you know how annoying it is to spend several hours wondering why your matrix rotation class isn’t working only to discover that the sin/cos functions are taking radians instead of degrees? I’ll tell you. It’s pretty fucking annoying.
Tags: Code, OSX
This entry was posted
on Monday, November 5th, 2007 at 7:59 am and is filed under Uncategorized.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
November 5th, 2007 at 9:58 am
man sin:
The sin() function computes the sine of x (measured in radians).

(Seems every coder has been there once, though.)
November 5th, 2007 at 11:40 am
Sure, NOW you tell me.
What happened here was sort of complicated. I ported my matrix class from another language where sin/cos took degrees instead of radians. I didn’t even think about it and just ported the code to Objective-C. What really confused me was that things -appeared- to be working since I got values back from my rotation transforms that LOOKED good but weren’t right.
Blargh! So annoying. Heh.
November 5th, 2007 at 2:04 pm
I HATE it when that happens! :p