How to check if object stopted rotating

Hello guys,

im using Add.Torque on an 2d object and rotating it. Now i want to get an alert when it stopped rotating. How can i do it.

Store rotation in a lastRotation variable, and check if rotation == lastRotation