Potentially easy math problem - inverting a number in a range

I am controlling several servos, and as a test I have a for loop (much like the Sweep example). My issue is that I have some servos mounted backwards (mirrored) so clockwise for one servo is counter clockwise for the other. Basically I am trying to get them to spin opposite directions when receiving the same position...

Hopefully this helps clarify:
servo1 position 0 = 0
servo2 position 0 = 180

My explanation may be a little confusing... I'm not really sure of the proper terminolgy for this type of thing.

void setup(){
  servo1.attach(0);
  servo2.attach(1); //this servo is mounted backwards
} 
 
void loop(){ 
  for(pos = 0; pos < 180; pos += 1){
    servo1.write(pos);
    servo2.write(pos); //pos needs flipped
    delay(15);
  } 
  for(pos = 180; pos>=1; pos-=1){
    servo1.write(pos);
    servo2.write(pos);//pos needs flipped
    delay(15);
  } 
}

180 - pos.

In Maths terms it is called the complement of the number and you subtract it from the full range, as already suggested.

Not tested, but try:

void setup(){
  servo1.attach(0);
  servo2.attach(1); //this servo is mounted backwards
} 
 
void loop(){ 
  for(pos = 0; pos < 180; pos += 1){
    servo1.write(pos);
    servo2.write(map(pos,0,180,180,0)); //map should flip pos
    delay(15);
  } 
  for(pos = 180; pos>=1; pos-=1){
    servo1.write(pos);
    servo2.write(map(pos,0,180,180,0)); //map should flip pos
    delay(15);
  } 
}

Lefty

Easier:

servo1.write(pos);
servo2.write(180-pos);