Fixed sin/cos?

Hopefully. But someone should check my work to be sure.