Menu

math.geom2d.curve.PolyCurve2D#asPolyline bug

Anton
2014-05-05
2014-05-07
  • Anton

    Anton - 2014-05-05
    public Polyline2D asPolyline(int n) {
        Point2D[] points = new Point2D[n+1];
        double t0 = this.t0();
        double t1 = this.t1();
        double dt = (t1 - t0) / n;
        for (int i = 0; i < n; i++)
            points[i] = this.point(i * dt + t0);
        return new Polyline2D(points);
    }
    

    array item with n+1 is always null

     
  • David

    David - 2014-05-07

    Hi Anton,
    thank you for reporting.
    This is fixed in the repository, an will be available in next release.
    regards,
    David

     

Log in to post a comment.