Keep the direction of the rotation of a Spinner

Hi, i have this spinner:

And, for now, i can rotate it when i click, and it moves in the direction of the mouse, the problem is when i released it:

Depends on the direction of my ‘drag and drop’ it rotates facing the oposite direction, all i want to do its to rotate the spinner just into the direction of the drag and drop.

This is my Script:

On this one, i just set the variable of the mouse x and y to the current position of the mouse and then i compare it with the next position, so this give me a number, which i set to another variable called ‘Distance’

Please i need answers, i don’t know how to set the direction of the spinner based on the released touch