Replies the center point of the capsule.

@return the center point.
335294
@Pure
	@Override
	public Point3d getCenter() {
		return new Point3d(
				(this.medial1.getX() + this.medial2.getX()) / 2.,
				(this.medial1.getY() + this.medial2.getY()) / 2.,
				(this.medial1.getZ() + this.medial2.getZ()) / 2.);
	}
1076833
def get_center_of_mass(self):
        
        xsum, ysum, counter = 0., 0., 0
        for stroke in self.get_pointlist():
            for point in stroke:
                xsum += point['x']
                ysum += point['y']
                counter += 1
        return (xsum / counter, ysum / counter)
1203309
function() {
    var aabb = this.getAABB();
    var sphere = { center: aabb.min.add(aabb.max).divide(2), radius: 0 };
    for (var i = 0; i < this.vertices.length; i++) {
      sphere.radius = Math.max(sphere.radius,
        Vector.fromArray(this.vertices[i]).subtract(sphere.center).length());
    }
    return sphere;
  }
861518
@Pure
	@Override
	public Point3f getCenter() {
		return new Point3f(
				(this.minx + this.maxx) / 2.,
				(this.miny + this.maxy) / 2.,
				(this.minz + this.maxz) / 2.);
	}
592568
public Point getCenter() {
        Point upperLeft = this.getLocation();
        Dimension dimensions = this.getSize();
        return new Point(upperLeft.getX() + dimensions.getWidth() / 2,
            upperLeft.getY() + dimensions.getHeight() / 2);
    }
1158504
function getCenter(points) {
        var center = {x: 0, y: 0};
        for (var i =0; i < points.length; ++i ) {
            center.x += points[i].x;
            center.y += points[i].y;
        }
        center.x /= points.length;
        center.y /= points.length;
        return center;
    }
317322
@Override
	public Point3d getPivot() {
		Point3d pivot = this.cachedPivot == null ? null : this.cachedPivot.get();
		if (pivot==null) {
			pivot = getProjection(0., 0., 0.);
			this.cachedPivot = new WeakReference<>(pivot);
		}
		return pivot;
	}
1318079
def center
      center = Vector3.new()
      @vertices.each do |vertex|
        center += vertex
      end
      center /= @vertices.size
      return center
    end
668844
public static Coordinate getCenterPoint(Bbox bbox) {
		double centerX = (bbox.getWidth() == 0 ? bbox.getX() : bbox.getX() + bbox.getWidth() / 2);
		double centerY = (bbox.getHeight() == 0 ? bbox.getY() : bbox.getY() + bbox.getHeight() / 2);
		return new Coordinate(centerX, centerY);
	}
889805
private void findStartingPoint() {
    // Well, we already know the best Y value...
    final double bestY = minmaxY.getMin();
    double bestX = Double.POSITIVE_INFINITY;
    int bestI = -1;
    Iterator<double[]> iter = this.points.iterator();
    for(int i = 0; iter.hasNext(); i++) {
      double[] vec = iter.next();
      if(vec[1] == bestY && vec[0] < bestX) {
        bestX = vec[0];
        bestI = i;
      }
    }
    assert (bestI >= 0);
    // Bring the reference object to the head.
    if(bestI > 0) {
      points.add(0, points.remove(bestI));
    }
  }
134201
@Pure
	public Point2d getPosition2D() {
		final Rectangle2d b = getBoundingBox();
		if (b == null) {
			return null;
		}
		return new Point2d(b.getCenterX(), b.getCenterY());
	}
362385
private CmsPoint getCropCenter() {

        CmsCroppingParamBean crop = m_croppingProvider.get();
        CmsImageInfoBean info = m_imageInfoProvider.get();
        if ((crop == null) || !crop.isCropped()) {
            return new CmsPoint(info.getWidth() / 2, info.getHeight() / 2);
        } else {
            return new CmsPoint(
                crop.getCropX() + (crop.getCropWidth() / 2),
                crop.getCropY() + (crop.getCropHeight() / 2));
        }
    }
224758
public PositionOptions getPosition()
	{
		IComplexOption position = options.getComplexOption("position");
		
		if (position instanceof PositionOptions)
		{
			return (PositionOptions) position;
		}
		
		return new PositionOptions()
				.setMy(new PositionAlignmentOptions(PositionRelation.CENTER))
				.setAt(new PositionAlignmentOptions(PositionRelation.CENTER))
				.setOf("window");
	}
77600
protected double getWorldRadius() {
		if (center != null) {
			Coordinate screenEndPoint = new Coordinate(center.getX() + radius, center.getY());
			Coordinate worldEndPoint = mapWidget.getMapModel().getMapView().getWorldViewTransformer().viewToWorld(
					screenEndPoint);
			double deltaX = worldEndPoint.getX() - getWorldCenter().getX();
			double deltaY = worldEndPoint.getY() - getWorldCenter().getY();
			return (float) Math.sqrt((deltaX * deltaX) + (deltaY * deltaY));
		}
		return 0;
	}
537713
@Override
  public DoubleVector getCenterOfMass() {
    final int dim = bounds.getDimensionality();
    double[] mean = new double[dim];
    for(int d = 0; d < dim; d++) {
      mean[d] = (bounds.getMin(d) + bounds.getMax(d)) * .5;
    }
    return DoubleVector.wrap(mean);
  }
1056059
public double[] toClusterCenter() {
		double[] output = new double[this.sumPoints.length + 1];
		System.arraycopy(this.sumPoints, 0, output, 1, this.sumPoints.length);
		output[0] = this.numPoints;
		for (int i = 1; i < output.length; i++) {
			output[i] /= this.numPoints;
		}
		return output;
	}
1204459
public double getDistanceToCenter(Point point) {
        return Nd4j.getExecutioner().execAndReturn(
                        ClusterUtils.createDistanceFunctionOp(distanceFunction, center.getArray(), point.getArray()))
                        .getFinalResult().doubleValue();
    }