Subtracts values of two points.

@param point1 FloatPoint.
@param point2 FloatPoint.
@return A new FloatPoint with the subtract operation.
192090
public FloatPoint Subtract(FloatPoint point1, FloatPoint point2) {
        FloatPoint result = new FloatPoint(point1);
        result.Subtract(point2);
        return result;
    }
996549
public static float min(final float a, final float b) {
        if (Float.isNaN(a)) {
            return b;
        } else if (Float.isNaN(b)) {
            return a;
        } else {
            return Math.min(a, b);
        }
    }
128822
public static Double getDistanceBetweenCoordinates(Tuple2<Double, Double> point1, Tuple2<Double, Double> point2) {
        // sqrt( (x2-x1)^2 + (y2-y2)^2 )
        Double xDiff = point1._1() - point2._1();
        Double yDiff = point1._2() - point2._2();
        return Math.sqrt(xDiff * xDiff + yDiff * yDiff);
    }
633414
public void set( double x1, double y1, double z1,
					 double x2, double y2, double z2 ) {
		this.p1.set(x1,y1,z1);
		this.p2.set(x2,y2,z2);
	}
92179
public static double[] minus(final double[] v1, final double[] v2) {
    assert v1.length == v2.length : ERR_VEC_DIMENSIONS;
    final double[] sub = new double[v1.length];
    for(int i = 0; i < v1.length; i++) {
      sub[i] = v1[i] - v2[i];
    }
    return sub;
  }
952639
public DoublePoint Add(DoublePoint point1, DoublePoint point2) {
        DoublePoint result = new DoublePoint(point1);
        result.Add(point2);
        return result;
    }
26903
public static BigDecimal subtract(final BigDecimal start, final BigDecimal... values) {
        BigDecimal total = start != null ? start : BigDecimal.ZERO;
        if (values != null) {
            for (final BigDecimal v : values) {
                total = doSubtract(total, v);
            }
        }
        return total;
    }
1148682
public void subtract(R1 relationships) {
        if (null == base) {
            throw new AssertionError("");
        }
        for (int i = 0; i < base.length; i++) {
            if (null == base[i]) {
                continue;
            }
            final IConceptSet set = data[i] = new SparseConceptHashSet();

            set.addAll(base[i]);
            if (null != relationships.data[i]) {
                set.removeAll(relationships.data[i]);
            }
        }
    }
1013821
public Rational subtract(Rational val) {
        Rational val2 = val.negate();
        return (add(val2));
    }
1200336
public static void swap(float[] floatArray, int index1, int index2) {
        TrivialSwap.swap(floatArray, index1, floatArray, index2);
    }
579037
public void set( double p1_x , double p1_y , double p2_x , double p2_y ) {
		this.p1.set(p1_x,p1_y);
		this.p2.set(p2_x,p2_y);
	}
994764
void subtract(Scalar o)
    {
        if (!type.equals(o.type))
        {
            throw new UnsupportedOperationException("Action with wrong kind of class");
        }
        value -= o.value;
    }
825417
public static float distance (float x1, float y1, float x2, float y2) {
        return FloatMath.sqrt(distanceSq(x1, y1, x2, y2));
    }
502874
public static double[] minusEquals(final double[] v1, final double[] v2) {
    assert v1.length == v2.length : ERR_VEC_DIMENSIONS;
    for(int i = 0; i < v1.length; i++) {
      v1[i] -= v2[i];
    }
    return v1;
  }
1303497
public static String subtractSeq(final String first, final String second) {
    return subtractSeq(first, second, DELIMITER);
  }
92678
public void set(double x1, double y1, double x2, double y2)
    {
        this.x1 = x1;
        this.y1 = y1;
        this.x2 = x2;
        this.y2 = y2;
    }
207771
public static float calculate(Map<String, Integer> features1, Map<String, Integer> features2) {
        TreeSet<String> keys = new TreeSet<String>(features1.keySet());
        keys.addAll(features2.keySet());

        float sum = 0.0f;
        for (String key : keys) {
            Integer c1 = features1.get(key);
            Integer c2 = features2.get(key);

            c1 = c1 == null ? 0 : c1;
            c2 = c2 == null ? 0 : c2;
            sum += 1.0 - Math.abs(c1 - c2) / (c1 + c2);
        }

        return sum / keys.size();
    }