/** Returns a new CircleArc2D. t0 and t1 are position on circle. */
 public CircleArc2D subCurve(double t0, double t1) {
   double startAngle, extent;
   if (this.direct) {
     startAngle = t0;
     extent = Angle2D.formatAngle(t1 - t0);
   } else {
     extent = -Angle2D.formatAngle(t1 - t0);
     startAngle = Angle2D.formatAngle(-t0);
   }
   return new CircleArc2D(this, startAngle, extent);
 }
 public double position(Point2D point) {
   double angle = Angle2D.horizontalAngle(xc, yc, point.x(), point.y());
   if (direct) return Angle2D.formatAngle(angle - theta);
   else return Angle2D.formatAngle(theta - angle);
 }