How to normalize rotation?

So on double mouse click my parent object rotates clockwise by 90 degrees, so it should be 0, 90, 180, 270 (0 or 360). But reality are different sometimes a have some floating number egz(90.000001), why so, gow to normalize it?

private int clickCounter = 0;
 float targetX = 90.0f;
 float timer = 0.5f;

	 void OnMouseDown(){
		screenPoint = Camera.main.WorldToScreenPoint(gameObject.transform.position);
		offset = gameObject.transform.parent.position - Camera.main.ScreenToWorldPoint (new Vector3 (Input.mousePosition.x, Input.mousePosition.y, screenPoint.z));
		gameObject.renderer.sortingOrder = 2;

		if (Input.GetMouseButton (0)) {

			mouseClickStart = true;
			Invoke("checkMouseDoubleClick",timer);
			clickCounter++;
		
			if (clickCounter == 2) {
				//gameObject.p.transform.rotation = Quaternion.Euler (0,0,targetX);
				gameObject.transform.parent.rotation  = Quaternion.Euler(0,0, targetX);
		
				targetX = targetX-90.0f;


			}
		}
	}

	private void checkMouseDoubleClick()
	{

		if(clickCounter > 1){
			Debug.Log("Double Clickedd");
		}else{
			Debug.Log("Single Clicked");
		}
		mouseClickStart = false;
		clickCounter = 0;
	}

That’s a limitation of floating point precision variables. Numbers in decimal system don’t necessarily match with their binary representation. In Unity, it is very prevalent (or rather, noticeable because it shows them all over the place). There isn’t anything you can do directly about it. You can manually round them off if you need whole numbers. But so long as they are part of GameObject/calculations/physics/change, they can eventually get jiggled.

Edit: Generally, floats are compared with Mathf.Abs(a - b) < epsilon, where epsilon is your chosen precision/tolerance (this is quick & dirty approach and there are downsides to it if you google around about this topic). You can use Unity’s Mathf.Approximately() as tanoshimi points out below.