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.

3 Responses to “Annoyance”

  1. nevyn Says:

    man sin:

    The sin() function computes the sine of x (measured in radians).
    :P
    (Seems every coder has been there once, though.)

  2. Warren Says:

    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.

  3. Ray Says:

    I HATE it when that happens! :p

Leave a Reply