I don't know the value of your rotation
variable is in your code, but I'm guessing that you maybe set it to 180
? If you did, that's likely the problem as it expects the argument to be provided in radians.
In that case, you can use rotated(deg2rad(180))