public void TestArcLength()
    {
        SqrtPolynomial poly    = segment.getArcLengthPolynomial();
        float          result1 = segment.Length;
        double         result2 = Math.Floor(poly.Simpson(0, 1) * 1e6) / 1e6;

        Assert.AreEqual(327.877900, result1);
        Assert.AreEqual(327.877935, result2);
    }
    public void TestArcLengthPolynomial()
    {
        SqrtPolynomial poly = segment.getArcLengthPolynomial();

        Assert.AreEqual(4, poly.Degree);
        Assert.AreEqual(900, poly[4]);
        Assert.AreEqual(-3600, poly[3]);
        Assert.AreEqual(279000, poly[2]);
        Assert.AreEqual(-259200, poly[1]);
        Assert.AreEqual(145800, poly[0]);
    }