summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bezier.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/bezier.go b/bezier.go
index 9bfb1f0..1add5c3 100644
--- a/bezier.go
+++ b/bezier.go
@@ -4,7 +4,7 @@ import "github.com/gonum/matrix/mat64"
var mb = []float64{-1, 3, -3, 1, 3, -6, 3, 0, -3, 3, 0, 0, 1, 0, 0, 0}
-func vector(x float64) []float64 {
+func newVector(x float64) []float64 {
v := make([]float64, 4)
v[3] = 1
v[2] = x * v[3]
@@ -14,7 +14,7 @@ func vector(x float64) []float64 {
}
func Vector(x float64) *mat64.Vector {
- return mat64.NewVector(4, vector(x))
+ return mat64.NewVector(4, newVector(x))
}
func Matrix(m []float64) *mat64.Dense {
@@ -29,7 +29,7 @@ func mult(U, V *mat64.Vector, Mb, Gb *mat64.Dense) float64 {
m1 := new(mat64.Dense)
m2 := new(mat64.Dense)
m1.Mul(Mb, Gb)
- m2.Mul(m1, Mb.T())
+ m2.Mul(m1, Mb)
return mat64.Inner(U, m2, V)
}