why this does not work?

here is the piece of code, basically it says that if the mouse is over on of two rectangles do not calculate distance based on mouse wheel…so mouse wheel should not work while the mouse is over any of these rectangles.
it works if i try with each one but when i am checking both it does not work. i guess that my logic is wrong please help

if(!(rectPrimary.Contains(invertedMousePosition)) || !(rectSecundary.Contains(invertedMousePosition))){	
		//CALCULATE DISTANCE BASED ON THE MOUSE WHEEL SCROLL
		distance += Input.GetAxis("Mouse ScrollWheel")*distance;
}

Your logic says ‘if the mouse is not in this rectange, or the mouse is not in this rectange: do this’. Write it as “if (!(C1) !(C2)) …” or, perhaps clearer in this case, “if (!(C1 || C2)) …” (pay close attention to where the parentheses are in both examples). So, to expand that (with some extra spaces added to the if condition to aid clarity):

if ( ! ( rectPrimary.Contains(invertedMousePosition) || rectSecundary.Contains(invertedMousePosition) ) ) {
		//CALCULATE DISTANCE BASED ON THE MOUSE WHEEL SCROLL
		distance += Input.GetAxis("Mouse ScrollWheel")*distance;
}