I am creating a minigame similar to Osu's Spinner. Essentially, you have to rotate this object as much as possible in a given time frame, while keeping your mouse within certain bounds. The problem I'm having is calculating how many rotations there are. I was thinking of periodically adding values to an array, then testing each one to see if a difference is greater than 180 degrees. For each difference like this, I would add to a variable and use half of that number as my count, but it seems to convoluted and I'm sure I would mess something up.
Is there some sort of nice way to do this? Thanks in advance.