.NET Oddities #4

This is sheer genius:

System.Math.Sin( double a )
System.Math.Cos( double a )

…etc

all take an angle in radians as their argument. However:

System.Drawing.Drawing2D.Matrix.Rotate( float angle )
and System.Drawing.Drawing2D.Matrix.Rotate( float angle, MatrixOrder order )

both take the angle in degrees. Who on earth designed this?!??

Never mind, it’s not that important. I’m just going to take a few deep breaths, get my blood pressure down, and go and make a nice, soothing cup of tea instead… and then I’m going to submit this to thedailywtf.com. For the rest of you, just watch out for this little gotcha: things like this are the reason multi-million dollar space probes go missing.