public Point centroid() { double centroidX = 0, centroidY = 0; for(Point knot : knots) { centroidX += knot.getX(); centroidY += knot.getY(); } return new Point(centroidX / knots.size(), centroidY / knots.size());}
欢迎分享,转载请注明来源:内存溢出
public Point centroid() { double centroidX = 0, centroidY = 0; for(Point knot : knots) { centroidX += knot.getX(); centroidY += knot.getY(); } return new Point(centroidX / knots.size(), centroidY / knots.size());}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)