Parcourir la source

Fixed Quaternion.Slerp() bug reported by github.com/thrisp

leonsal il y a 8 ans
Parent
commit
1e576ef564
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      math32/quaternion.go

+ 1 - 1
math32/quaternion.go

@@ -310,7 +310,7 @@ func (this *Quaternion) Slerp(qb *Quaternion, t float32) *Quaternion {
 	x := this.x
 	y := this.y
 	z := this.z
-	w := this.z
+	w := this.w
 
 	cosHalfTheta := w*qb.w + x*qb.x + y*qb.y + z*qb.z