getting rotation to drive mecanim parameter

im trying to get the current and previous rotation of my character to drive a mecanim float parameter
i want to get for example a -1 when rotating left and +1 when rotating right and 0 when not rotating, this is easy when using axis input but the rotation happens even without axis input so i cant use that.
i havent got any idea to code this and im not very experienced in coding.
any help would be great.

im not asking for a working script just an idea to point me in the right direction…