Return a new point that is twice the old.
189752
def double( self ):
    """"""

    if self == INFINITY:
      return INFINITY

    # X9.62 B.3:

    p = self.__curve.p()
    a = self.__curve.a()

    l = ( ( 3 * self.__x * self.__x + a ) * \
          numbertheory.inverse_mod( 2 * self.__y, p ) ) % p

    x3 = ( l * l - 2 * self.__x ) % p
    y3 = ( l * ( self.__x - x3 ) - self.__y ) % p

    return Point( self.__curve, x3, y3 )
442218
def _new_point(self, loglstar, logvol):
        """"""

        ncall, nupdate = 0, 0
        while True:
            # Get the next point from the queue
            u, v, logl, nc, blob = self._get_point_value(loglstar)
            ncall += nc

            # Bounding checks.
            ucheck = ncall >= self.update_interval * (1 + nupdate)
            bcheck = self._beyond_unit_bound(loglstar)

            # If our queue is empty, update any tuning parameters associated
            # with our proposal (sampling) method.
            if blob is not None and self.nqueue <= 0 and bcheck:
                self.update_proposal(blob)

            # If we satisfy the log-likelihood constraint, we're done!
            if logl >= loglstar:
                break

            # If there has been more than `update_interval` function calls
            # made *and* we satisfy the criteria for moving beyond sampling
            # from the unit cube, update the bound.
            if ucheck and bcheck:
                pointvol = math.exp(logvol) / self.nlive
                bound = self.update(pointvol)
                if self.save_bounds:
                    self.bound.append(bound)
                self.nbound += 1
                nupdate += 1
                self.since_update = -ncall  # ncall will be added back later

        return u, v, logl, ncall
65508
def duplicate(cls, other):
        """"""
        return cls(other.soil_type, other.thickness, other.shear_vel)
627572
@SuppressWarnings("static-method")
	public Point1dfx newPoint(ObjectProperty<WeakReference<Segment1D<?, ?>>> segment, DoubleProperty x, DoubleProperty y) {
		return new Point1dfx(segment, x, y);
	}
548202
def point2upoint(point):
    """"""
    upoint = [set(), set()]
    for v, val in point.items():
        upoint[val].add(v.uniqid)
    upoint[0] = frozenset(upoint[0])
    upoint[1] = frozenset(upoint[1])
    return tuple(upoint)
695069
def upoint2bddpoint(upoint):
    
    point = dict()
    for uniqid in upoint[0]:
        point[_VARS[uniqid]] = 0
    for uniqid in upoint[1]:
        point[_VARS[uniqid]] = 1
    return point
877691
def round(self):
    """"""
    return Point(int(round(self.x)), int(round(self.y)))
710369
function (p, p1, p2, sqDist) {
		var x = p1.x,
		    y = p1.y,
		    dx = p2.x - x,
		    dy = p2.y - y,
		    dot = dx * dx + dy * dy,
		    t;

		if (dot > 0) {
			t = ((p.x - x) * dx + (p.y - y) * dy) / dot;

			if (t > 1) {
				x = p2.x;
				y = p2.y;
			} else if (t > 0) {
				x += dx * t;
				y += dy * t;
			}
		}

		dx = p.x - x;
		dy = p.y - y;

		return sqDist ? dx * dx + dy * dy : new L.Point(x, y);
	}
447412
public static IntPoint Multiply(IntPoint point1, IntPoint point2) {
        IntPoint result = new IntPoint(point1);
        result.Multiply(point2);
        return result;
    }
207880
def _call(self, x):
        """"""
        x_norm = self.pointwise_norm(x).ufuncs.max()

        if x_norm > 1:
            return np.inf
        else:
            return 0
580610
def for_point(cls, point, zoom):
        """"""
        latitude, longitude = point.latitude_longitude
        return cls.for_latitude_longitude(latitude=latitude, longitude=longitude, zoom=zoom)
90053
function (extraPoints) {
		var points = this._originalPoints,
			len = points ? points.length : 0;
		// Increment length by extraPoints if present
		len += extraPoints || 0;

		return !this._originalPoints || len <= 3;
	}
259944
def P2(self, value):
        """"""
        if value > self.P1:
            self._P2 = value
        else:
            raise InvalidSecondDisparityChangePenaltyError("P2 must be greater "
                                                          "than P1.")
        self._replace_bm()
598013
function(vec2, returnNew) {
      if (!returnNew) {
        this.x += vec2.x; this.y += vec2.y;
        return this.change();
      } else {
        // Return a new vector if `returnNew` is truthy
        return new Vec2(
          this.x + vec2.x,
          this.y + vec2.y
        );
      }
    }
389619
def _pycall_path_old(x1: int, y1: int, x2: int, y2: int, handle: Any) -> float:
    """"""
    func, userData = ffi.from_handle(handle)
    return func(x1, y1, x2, y2, userData)
365646
function( pointA, pointB ) {

	        return { x: pointB.x - pointA.x, y: -( pointB.y - pointA.y ) };
	    }
789319
@SuppressWarnings("static-method")
	public Point2ifx newPoint(IntegerProperty x, IntegerProperty y) {
		return new Point2ifx(x, y);
	}