Doubles this point.

        Returns:
            JacobianPoint: The point corresponding to `2 * self`.
164921
def double(self):
        
        X1, Y1, Z1 = self.X, self.Y, self.Z

        if Y1 == 0:
            return POINT_AT_INFINITY
        S = (4 * X1 * Y1 ** 2) % self.P
        M = (3 * X1 ** 2 + self.a * Z1 ** 4) % self.P
        X3 = (M ** 2 - 2 * S) % self.P
        Y3 = (M * (S - X3) - 8 * Y1 ** 4) % self.P
        Z3 = (2 * Y1 * Z1) % self.P
        return JacobianPoint(X3, Y3, Z3)
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)
902878
def points_to_double(self):
        
        if self.points.dtype != np.double:
            self.points = self.points.astype(np.double)
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 )
647874
public Coordinate getMiddlePoint() {
		double x = this.x1() + 0.5 * (this.x2() - this.x1());
		double y = this.y1() + 0.5 * (this.y2() - this.y1());
		return new Coordinate(x, y);
	}
1171833
public FloatPoint Multiply(FloatPoint point1, FloatPoint point2) {
        FloatPoint result = new FloatPoint(point1);
        result.Multiply(point2);
        return result;
    }
30324
function(point) {
        if (this.internalProjection && this.externalProjection) {
            point = point.clone();
            point.transform(this.internalProjection, 
                               this.externalProjection);
        }
        return point.x + "," + point.y;                     
    }
765731
private static Point2D computePointsCentroid(MultiPoint multiPoint)
    {
        double xSum = 0;
        double ySum = 0;
        int pointCount = multiPoint.getPointCount();
        Point2D point2D = new Point2D();
        for (int i = 0; i < pointCount; i++) {
            multiPoint.getXY(i, point2D);
            xSum += point2D.x;
            ySum += point2D.y;
        }
        return new Point2D(xSum / pointCount, ySum / pointCount);
    }
845463
def scale2x(self, surface):
        
        assert(self._scale == 2)
        return self._pygame.transform.scale2x(surface)
1198977
@Pure
	public static GeodesicPosition L2_WSG84(double x, double y) {
		final Point2d ntfLambdaPhi = NTFLambert_NTFLambdaPhi(x, y,
				LAMBERT_2_N,
				LAMBERT_2_C,
				LAMBERT_2_XS,
				LAMBERT_2_YS);
		return NTFLambdaPhi_WSG84(ntfLambdaPhi.getX(), ntfLambdaPhi.getY());
	}
958271
public DoublePoint Subtract(DoublePoint point1, DoublePoint point2) {
        DoublePoint result = new DoublePoint(point1);
        result.Subtract(point2);
        return result;
    }
1155807
function(p, t) {

            var x = this.x;
            var y = this.y;
            return new Point((1 - t) * x + t * p.x, (1 - t) * y + t * p.y);
        }
865318
def point_mid(pt1, pt2):
    
    if len(pt1) != len(pt2):
        raise ValueError("The input points should have the same dimension")

    dist_vector = vector_generate(pt1, pt2, normalize=False)
    half_dist_vector = vector_multiply(dist_vector, 0.5)
    return point_translate(pt1, half_dist_vector)
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
347107
function() {
                var newPoint = new BezierPoint(), tmp = null;
                tmp = this.getVertex();
                newPoint.setVertex(tmp.x, tmp.y);
                tmp = this.getForward();
                newPoint.setForward(tmp.x, tmp.y);
                tmp = this.getBackward();
                newPoint.setBackward(tmp.x, tmp.y);
                newPoint.setSymReflaction(this.isSymReflaction);
                newPoint.setSmooth(this.isSmooth());
                return newPoint;
            }
168513
function Point2D(x, y) {
    _classCallCheck(this, Point2D);

    this.x = x !== undefined ? x : 0.0;
    this.y = y !== undefined ? y : 0.0;
  }
998491
def distance_to_point2(self, p2: "Point2") -> Union[int, float]:
        
        return ((self[0] - p2[0]) ** 2 + (self[1] - p2[1]) ** 2) ** 0.5