Switching sin and cos