Skip to content

Commit

Permalink
remove unnecessary call to Normalize().
Browse files Browse the repository at this point in the history
  • Loading branch information
luisgargitter authored and pwaller committed Jan 27, 2024
1 parent 6fb0641 commit c307faa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mgl32/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion mgl64/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit c307faa

Please sign in to comment.