Completed a working sin/cos swapping example.