spatial/r3: make example test pass on arm64

This commit is contained in:
Dan Kortschak
2024-03-28 05:37:02 +10:30
parent 4c683c29b7
commit 004477bd77

View File

@@ -38,20 +38,20 @@ func Example_slerp() {
for i := 0.0; i <= steps; i++ {
t := i / steps
rotated := slerp(initialRot, finalRot, t).Rotate(v)
fmt.Printf("%.2f %.4g\n", t, rotated)
fmt.Printf("%.2f %+.2f\n", t, rotated)
}
// Output:
//
// 0.00 {1 -1.11e-16 1.414}
// 0.10 {1 -0.3301 1.375}
// 0.20 {1 -0.642 1.26}
// 0.30 {1 -0.9185 1.075}
// 0.40 {1 -1.144 0.8313}
// 0.50 {1 -1.307 0.5412}
// 0.60 {1 -1.397 0.2212}
// 0.70 {1 -1.41 -0.111}
// 0.80 {1 -1.345 -0.437}
// 0.90 {1 -1.206 -0.7389}
// 1.00 {1 -1 -1}
// 0.00 {+1.00 -0.00 +1.41}
// 0.10 {+1.00 -0.33 +1.38}
// 0.20 {+1.00 -0.64 +1.26}
// 0.30 {+1.00 -0.92 +1.08}
// 0.40 {+1.00 -1.14 +0.83}
// 0.50 {+1.00 -1.31 +0.54}
// 0.60 {+1.00 -1.40 +0.22}
// 0.70 {+1.00 -1.41 -0.11}
// 0.80 {+1.00 -1.34 -0.44}
// 0.90 {+1.00 -1.21 -0.74}
// 1.00 {+1.00 -1.00 -1.00}
}