modify test

This commit is contained in:
Laurent Le Goff 2011-05-17 23:32:54 +02:00
parent 134733cea8
commit 89f314a1e6
2 changed files with 4 additions and 3 deletions

View File

@ -43,6 +43,8 @@ func (c *CubicCurveFloat64) Subdivide() (c1, c2 *CubicCurveFloat64) {
return
}
// subdivide the curve in straight lines using Casteljau subdivision
// and computing minimal distance tolerance
func (c *CubicCurveFloat64) SegmentCasteljau() []float64{
// reinit segments
c.segments = make([]float64, 0, 2)

View File

@ -7,11 +7,10 @@ import (
var (
cf64Test1 = NewCubicCurveFloat64(0, 0, 20000, 0, 0, 20000, 20000, 20000)
cf64Test1 = NewCubicCurveFloat64(100, 100, 200, 100, 100, 200, 200, 200)
)
func BenchmarkCubicCurveCasteljauFloat64(b *testing.B) {
func BenchmarkCubicCurveCasteljauTest1(b *testing.B) {
var s []float64
for i := 0; i < b.N; i++ {
s = cf64Test1.SegmentCasteljau()