You seem to have Cos() and Sin() mixed up in your code example.
Use Cos() to calulate X position and Sin() to calculate Y position. In your code you are doing the opposite(Sin() for X and Cos() for y).
Use Cos() to calulate X position and Sin() to calculate Y position. In your code you are doing the opposite(Sin() for X and Cos() for y).