float32 -> float64
This commit is contained in:
@@ -37,10 +37,10 @@ func Neville(P []Point2d, ts []float64, t float64) (*Point2d, error) {
|
||||
order := len(P) - 1
|
||||
for i := 0; i < order; i++ {
|
||||
for j := 0; j < order-i; j++ {
|
||||
var tLeft float32 = float32(ts[i+j+1] - t)
|
||||
var tRight float32 = float32(t - ts[j])
|
||||
tLeft := ts[i+j+1] - t
|
||||
tRight := t - ts[j]
|
||||
Q[j] = Q[j].ToVector().Scale(tLeft).ToPoint().Add(P[j+1].ToVector().Scale(tRight))
|
||||
Q[j] = Q[j].ToVector().Scale(float32(1.0 / (ts[i+j+1] - ts[j]))).ToPoint()
|
||||
Q[j] = Q[j].ToVector().Scale(1.0 / (ts[i+j+1] - ts[j])).ToPoint()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user