Can now switch between sine and cosine.