How would you find out if a rotation is between two values?

{
public bool slowMo;

	void Start()
	{
		slowMo = false;
	}

	void Update()
	{
		if (transform.rotation.z <= 40 && transform.rotation.z >= -40)
		{
			slowMo = false;
		}
		else
		{
			slowMo = true;
		}

		if (slowMo == true)
		{
			Time.timeScale = .3f;
		}
		else
		{
			Time.timeScale = 1;
		}
	}
}

With this code I am meaning to slow down time when the rotation of the block, which this script is attached to, rotates past 40 degrees in either direction, though when I run the game it sets slowMo to true even when the block is sitting vertical. Any help would be greatly appreciated.

alright, this seems to work

{
	public bool slowMo;

	void Update()
	{
		Debug.Log (transform.eulerAngles.z);
		Debug.Log (slowMo);

		if (transform.eulerAngles.z >= 210 || transform.eulerAngles.z <= 150)
		{
			slowMo = true;
		}

		if (slowMo == true)
		{
			Time.timeScale = .3f;
		}
	}
}

thank you raulrsd for your help

Yo have a problem with the if statement. No number could be at the same time greater than 40 and less than -40. I think that what you wanted to write was

         if (transform.rotation.z >= 40 || transform.rotation.z <= -40)
         {
             slowMo = false;
         }
         else
         {
             slowMo = true;
         }