mathf.clamp and rotation

I’m having a problem clamping a rotation using mathf.clamp. I just want my object to rotate to 90 degrees instead it continuously rotates. Can anyone tell me what I’m doing wrong?

transform.Rotate(new Vector3(0, Mathf.Clamp(Time.deltaTime * 2, 1.0F, 90.0F), 0));

Why are you using deltaTime if you want it to stay in one position?

Transform.Rotate() requests a chanhe in rotation relative to the current Transform.rotation.

I.e. each frame you are rotating a little further. The clamp is only ensuring an upper limit of 90 deg per frame.

I suggest you look at Quaternion.RotateTowards().