public static double Rotate180Degrees(double angleToRotate) { if(angleToRotate < 0) { return -angleToRotate - 180; } return 180 - angleToRotate; }