Programming Servo How To Get -90 Degrees as the question title states, how will I go about turning the servo opposite of 90 degrees?

I have written my code as such;

  // Turn servo to the right
  if(x &gt; 520 &amp;&amp; y &lt; 510 &amp;&amp; y &gt; 490){
  servo.write(0);
  delay(50);

  //Turn left
  }else if(x &lt; 490 &amp;&amp; y &lt; 510 &amp;&amp; y &gt; 490){
    servo.write(180);
    delay(50);

 //Turn backwards
} else if(y &lt; 490 &amp;&amp; x &lt; 520 &amp;&amp; x &gt; 490){
  servo.write(-90);
  delay(50);


Obviously -90 isn't an actual degree on the servo, and it will only turn between 0 and 180. I was therefore wondering if there was any other way to code it?

The servo is connected to a joystick, and the plan is to built a 360 degrees vertical and 180 degrees horizontal turret of sorts. Every other command works, and when I replace -90 with 90 degrees, it works as well. So it is wired correctly.

Of course I would have to add another joystick and another servo later on, but at this stage I am simply testing my own coding skills.
Normal servos only have a range of 180°. You can give yourself an "offset", so you have -90° to 90°, but you only ever get 180° range. You can't go -90° to 180°.

Using mechanics (outside the scope of this site) you can multiply your movement (think gears) so that your range is bigger.