Fun fact: While implementing an interactive widget/canvas system based on the DisplayPDF spec, I discovered a subtle bug in a heavily-optimized C graphics library when rendering certain kinds of paths, due to the use of atan() instead of atan2().
Yeah, good code is hard.
This is still my favourite example of someone not understanding how complicated code can be