/* (non-Javadoc)
@see org.joml.Vector3fc#distance(float, float, float)
480735
public float distance(float x, float y, float z) {
        float dx = this.x - x;
        float dy = this.y - y;
        float dz = this.z - z;
        return (float) Math.sqrt(dx * dx + dy * dy + dz * dz);
    }
1364038
function distanceToPoint(v) {
         var a = this.getBounds(); // the me.Vector2d object also implements the same function, but
         // we have to use here the center of both entities

         var dx = a.pos.x + a.width / 2 - v.x;
         var dy = a.pos.y + a.height / 2 - v.y;
         return Math.sqrt(dx * dx + dy * dy);
       }
706237
def distance(coordinates)
      coordinates = coordinates.center if coordinates.respond_to?(:center)
      Math.sqrt([center, coordinates].transpose.map {|a,b| (b - a)**2}.reduce {|d1,d2| d1 + d2})
    end
739408
public double distance(Vector3d v) {
        double dx = x - v.x;
        double dy = y - v.y;
        double dz = z - v.z;

        return Math.sqrt(dx * dx + dy * dy + dz * dz);
    }
1334992
@Override
  public double distance(NumberVector v1, NumberVector v2) {
    if(v1.getDimensionality() != v2.getDimensionality()) {
      throw new IllegalArgumentException("Different dimensionality of FeatureVectors\n  " + "first argument: " + v1 + "\n  " + "second argument: " + v2);
    }

    double sqrDist = 0;
    for(int d = BitsUtil.nextSetBit(dimensions, 0); d >= 0; d = BitsUtil.nextSetBit(dimensions, d + 1)) {
      final double delta = v1.doubleValue(d) - v2.doubleValue(d);
      sqrDist += delta * delta;
    }
    return FastMath.sqrt(sqrDist);
  }
1344822
public final double distance(final double[] value1, final double[] value2) {
        double agg = 0;
        for (int i = 0; i < value1.length; i++) {
            agg += (value1[i] - value2[i]) * (value1[i] - value2[i]);
        }
        return Math.sqrt(agg);
    }
1150299
function distanceTo(e) {
         var a = this.getBounds();
         var b = e.getBounds(); // the me.Vector2d object also implements the same function, but
         // we have to use here the center of both entities

         var dx = a.pos.x + a.width / 2 - (b.pos.x + b.width / 2);
         var dy = a.pos.y + a.height / 2 - (b.pos.y + b.height / 2);
         return Math.sqrt(dx * dx + dy * dy);
       }
36720
public float distance2(float tx, float ty) {
		float dx = tx - px;
		float dy = ty - py;
		
		return ((dx*dx) + (dy*dy));
	}
6967
@Pure
	public double distanceSquaredSegment(Point3D point) {
		return distanceSquaredSegmentPoint(
				getX1(), getY1(), getZ1(),
				getX2(), getY2(), getZ2(),
				point.getX(), point.getY(), point.getZ());
	}
247209
@Pure
	public double distanceSquaredLine(Point3D point) {
		return distanceSquaredLinePoint(
				getX1(), getY1(), getZ1(),
				getX2(), getY2(), getZ2(),
				point.getX(), point.getY(), point.getZ());
	}
224597
public static final double distance(final Point2D a, final Point2D b)
    {
        return Point2DJSO.distance(a.getJSO(), b.getJSO());
    }
22311
public double distance(Vector3dc v) {
    	return distance(v.x(), v.y(), v.z());
    }
619283
public static float distance(final float ax, final float ay,
                                 final float bx, final float by) {
        return (float) Math.sqrt(
                (ax - bx) * (ax - bx) +
                        (ay - by) * (ay - by)
        );
    }
1102428
public double getDistance(Coordinate coordinate) {
		double distance = Double.MAX_VALUE;
		if (!isEmpty()) {
			for (Polygon polygon : polygons) {
				double d = polygon.getDistance(coordinate);
				if (d < distance) {
					distance = d;
				}
			}
		}
		return distance;
	}
1109729
public long gridDistance(Vector3ic v) {
        return Math.abs(v.x() - x()) + Math.abs(v.y() - y())  + Math.abs(v.z() - z());
    }
270273
function(obj) {
    if (obj.anchor) { return obj.distanceFrom(this); }
    var V = obj.elements || obj;
    if (V.length != this.elements.length) { return null; }
    var sum = 0, part;
    this.each(function(x, i) {
      part = x - V[i-1];
      sum += part * part;
    });
    return Math.sqrt(sum);
  }
948448
public double distance (Vector3 point) {
        double distance = -Float.MAX_VALUE;
        for (Plane plane : _planes) {
            distance = Math.max(distance, plane.distance(point));
        }
        return distance;
    }