[Input]
  _rhs_ should be Vector3.
 [Output]
  return distance between two points as Numeric.
348512
def distance(rhs)
      Util3D.check_arg_type(Vector3, rhs)
      Math::sqrt((self.x - rhs.x)*(self.x - rhs.x) + (self.y - rhs.y)*(self.y - rhs.y) + (self.z - rhs.z)*(self.z - rhs.z))
    end
71771
def distance_to(self, point):
        '''
        
        '''
        angle = math.acos(
            sin(self.lat_radians) * sin(point.lat_radians) +
            cos(self.lat_radians) * cos(point.lat_radians) *
            cos(self.long_radians - point.long_radians)
        )
        return angle * EARTH_RADIUS
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);
    }
366599
def distance(self, point):
        
        return sqrt((self.x-point.x)**2+(self.y-point.y)**2)
323759
def angle(rhs)
      Util3D.check_arg_type(Vector3, rhs)
      vec1Length = self.length ;
      vec2Length = rhs.length   ;
      return 0.0 if(vec1Length*vec2Length < self.tolerance )
      v = self.dot(rhs)/(vec1Length*vec2Length)
      Math::acos( v )
    end
792009
def distance_to(self, *args):
        """"""
        if not len(args) > 0:
            raise ValueError("at least one parameter must be given")

        x = args[0]
        if len(args) > 1:
            unit = args[1]
        else:
            unit = "px"
        u = {"px": (1.,1.), "in": (1.,72.), "cm": (2.54, 72.),
             "mm": (25.4, 72.)}
        f = u[unit][0] / u[unit][1]
        if type(x) is Point:
            return abs(self - x) * f

# from here on, x is a rectangle
# as a safeguard, make a finite copy of it
        r = Rect(x.top_left, x.top_left)
        r = r | x.bottom_right
        if self in r:
            return 0.0
        if self.x > r.x1:
            if self.y >= r.y1:
                return self.distance_to(r.bottom_right, unit)
            elif self.y <= r.y0:
                return self.distance_to(r.top_right, unit)
            else:
                return (self.x - r.x1) * f
        elif r.x0 <= self.x <= r.x1:
            if self.y >= r.y1:
                return (self.y - r.y1) * f
            else:
                return (r.y0 - self.y) * f
        else:
            if self.y >= r.y1:
                return self.distance_to(r.bottom_left, unit)
            elif self.y <= r.y0:
                return self.distance_to(r.top_left, unit)
            else:
                return (r.x0 - self.x) * f
1237599
def distance(self, other):
        
        return distance(self.lat, self.lon, None, other.lat, other.lon, None)
1114117
public float distance(Vector3fc v) {
    	return distance(v.x(), v.y(), v.z());
    }
155763
def to_vec3(self):
        """"""
        vec3 = Vector3()
        vec3.x = self.x
        vec3.y = self.y
        vec3.z = self.z

        if self.w != 0:
            vec3 /= self.w

        return vec3
157981
function multiply(point, rhs) {
    if (typeof rhs === 'number') {
        return {
            x: point.x * rhs,
            y: point.y * rhs,
        };
    } else {
        return {
            x: point.x * rhs.x,
            y: point.y * rhs.y,
        };
    }
}
1053315
def cross(rhs)
      Util3D.check_arg_type(Vector3, rhs)
      Vector3.new(
              self.y*rhs.z - self.z*rhs.y,
              self.z*rhs.x - self.x*rhs.z,
              self.x*rhs.y - self.y*rhs.x)
    end
61816
def distance(pos0, pos1):
    
    r0, pa0 = pos0
    #logging.debug('r0={}, pa0={} (from {})'.format(r0, pa0, self))
    ra0 = r0*np.sin(pa0*np.pi/180)
    dec0 = r0*np.cos(pa0*np.pi/180)

    r1, pa1 = pos1
    #logging.debug('r1={}, pa1={} (from {})'.format(r0, pa0, other))
    ra1 = r1*np.sin(pa1*np.pi/180)
    dec1 = r1*np.cos(pa1*np.pi/180)

    dra = (ra1 - ra0)
    ddec = (dec1 - dec0)
    return np.sqrt(dra**2 + ddec**2)
1270277
def distance_to_point(self, point):
        
        return np.abs(np.dot(self.normal_vector, point) + self.d)
1008078
public float distanceSquared(Vector2f point) {
		getClosestPoint(point, closest);
		closest.sub(point);

		float result = closest.lengthSquared();

		return result;
	}
813875
def distance(self) -> ErrorValue:
        """"""
        if 'DistCalibrated' in self._data:
            dist = self._data['DistCalibrated']
        else:
            dist = self._data["Dist"]
        if 'DistCalibratedError' in self._data:
            disterr = self._data['DistCalibratedError']
        elif 'DistError' in self._data:
            disterr = self._data['DistError']
        else:
            disterr = 0.0
        return ErrorValue(dist, disterr)
84778
def distance_to(self, other):
        """"""

        other_coord = self._arith_check(other)
        return math.sqrt(math.pow(self._x - other_coord._x, 2) +
                         math.pow(self._y - other_coord._y, 2))
1341039
def distance_to(self, other):
        """"""
        return np.linalg.norm(self.position-other.position)