Optimized sin/cos performance.
Tiny optimizations