by subtracting multiples of 360.
320916
private static double normalize(double v, double range) {
        double a = v-Math.floor((v + (range/2))/range)*range;
        // Make sure that a and v have the same sign
        // when abs(v) = 180.
        if (Math.abs(a) == 180.0 && (a * v) < 0) {
            a *= -1;
        }
        // The addition of 0.0 is to avoid negative
        // zero, which just confuses things.
        return a + 0.0;
    }
1088515
def subtractprivkeys(p1,p2):
    '''
    
    '''

    return dechex(((int(p1,16) + (N - int(p2,16))) % N),32)
509618
private int precisionSum(List<UnitFactor> factors) {
    return factors.stream().map(f -> totalPrecision(f.rational())).reduce(0, Math::addExact);
  }
1062781
public float sMulti(float y, int A, int B, float C) {
    float tmp1, tmp2;

    tmp1 = ((float) 4.0 * A + (float) 2.0) *
      (float) Math.PI *
      ((float) 0.5 - Math.abs(y - C) / ((float) 2.0 * ((float) Math.floor(C - y) + C)));
    tmp2 = (float) 4.0 * B *
      (float) StrictMath.pow(Math.abs(y - C) / ((float) 2.0 * ((float) Math.floor(C - y) + C))
        , (float) 2.0);

    return correctTo01(((float) 1.0 + (float) Math.cos(tmp1) + tmp2) / (B + (float) 2.0));
  }
125268
function () {
    // Grab the items
    var items = this.items;

    // Find the most negative x and y
    var minX = Infinity,
        minY = Infinity;
    items.forEach(function (item) {
      var coords = item;
      minX = Math.min(minX, coords.x);
      minY = Math.min(minY, coords.y);
    });

    // Offset each item by -minX, -minY; effectively resetting to 0, 0
    items.forEach(function (item) {
      var coords = item;
      coords.x -= minX;
      coords.y -= minY;
    });
  }
34046
public void mul(Complex c) {
        double newreal = real * c.real - imag * c.imag;
        double newimag = real * c.imag + imag * c.real;
        real = newreal;
        imag = newimag;
    }
470691
public Matrix subtract(double c)
    {
        Matrix toReturn = getThisSideMatrix(null);
        toReturn.mutableSubtract(c);
        return toReturn;
    }
1179665
public static void subtractEquals( DMatrix4 a , DMatrix4 b ) {
        a.a1 -= b.a1;
        a.a2 -= b.a2;
        a.a3 -= b.a3;
        a.a4 -= b.a4;
    }
1337208
function() {

      // atan(c) = i / 2 log((i + x) / (i - x))

      var a = this['re'];
      var b = this['im'];

      if (a === 0) {

        if (b === 1) {
          return new Complex(0, Infinity);
        }

        if (b === -1) {
          return new Complex(0, -Infinity);
        }
      }

      var d = a * a + (1.0 - b) * (1.0 - b);

      var t1 = new Complex(
              (1 - b * b - a * a) / d,
              -2 * a / d).log();

      return new Complex(-0.5 * t1['im'], 0.5 * t1['re']);
    }
1114466
def dock(self, other):
		'''
			
		'''
		if other.multiplicand != self.multiplicand:
			raise Exception("Can't subtract " + repr(other) + " from " + repr(self))
		return mult(self.multiplicand, self.multiplier - other.multiplier)
859051
function(v) {
        //var theta = -1 * (v % 360); //angle always between 0 and 359
        var difference = this._rotation - v;
        // skip if there's no rotation!
        if (difference === 0) return;
        else this._rotation = v;

        this._calculateMBR();

        this.trigger("Rotate", difference);
    }
144793
def subtract(self, jobShape):
        
        self.shape = Shape(self.shape.wallTime,
                           self.shape.memory - jobShape.memory,
                           self.shape.cores - jobShape.cores,
                           self.shape.disk - jobShape.disk,
                           self.shape.preemptable)
1131055
public int get24( int x , int y ) {
		int i = startIndex + y*stride+x*3;
		return ((data[i]&0xFF) << 16) | ((data[i+1]&0xFF) << 8) | (data[i+2]&0xFF);
	}
504897
public PackedDecimal subtract(PackedDecimal operand) {
        if (this.isBruch() || operand.isBruch()) {
            return subtract(operand.toBruch());
        } else {
            return subtract(operand.toBigDecimal());
        }
    }
23311
def multiply(self, other):
        """"""
        return self.operation(other, lambda x, y: x * y)
943383
def _subtract(summary, o):
    """"""
    found = False
    row = [_repr(o), 1, _getsizeof(o)]
    for r in summary:
        if r[0] == row[0]:
            (r[1], r[2]) = (r[1] - row[1], r[2] - row[2])
            found = True
    if not found:
        summary.append([row[0], -row[1], -row[2]])
    return summary
1070345
public static IntegerBinding subtractExact(final int x, final ObservableIntegerValue y) {
        return createIntegerBinding(() -> Math.subtractExact(x, y.get()), y);
    }