From c307faa8751177454eeb22cc376d92664f1b87ca Mon Sep 17 00:00:00 2001 From: Luis Gargitter Date: Sat, 27 Jan 2024 00:47:08 +0100 Subject: [PATCH] remove unnecessary call to Normalize(). --- mgl32/project.go | 2 +- mgl64/project.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mgl32/project.go b/mgl32/project.go index b96fffd..07c074e 100644 --- a/mgl32/project.go +++ b/mgl32/project.go @@ -47,7 +47,7 @@ func LookAt(eyeX, eyeY, eyeZ, centerX, centerY, centerZ, upX, upY, upZ float32) // space. func LookAtV(eye, center, up Vec3) Mat4 { f := center.Sub(eye).Normalize() - s := f.Cross(up.Normalize()).Normalize() + s := f.Cross(up).Normalize() u := s.Cross(f) M := Mat4{ diff --git a/mgl64/project.go b/mgl64/project.go index d477c08..97df22b 100644 --- a/mgl64/project.go +++ b/mgl64/project.go @@ -49,7 +49,7 @@ func LookAt(eyeX, eyeY, eyeZ, centerX, centerY, centerZ, upX, upY, upZ float64) // space. func LookAtV(eye, center, up Vec3) Mat4 { f := center.Sub(eye).Normalize() - s := f.Cross(up.Normalize()).Normalize() + s := f.Cross(up).Normalize() u := s.Cross(f) M := Mat4{