Skip to content

Commit

Permalink
fix reversed cross products in lookAtRH
Browse files Browse the repository at this point in the history
  • Loading branch information
AE9RB committed Feb 29, 2016
1 parent d61f390 commit 3995404
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/glm.swift
Original file line number Diff line number Diff line change
Expand Up @@ -630,8 +630,8 @@ extension SGLMath
(eye:Vector3<T>, _ center:Vector3<T>, _ up:Vector3<T>) -> Matrix4x4<T>
{
let f:Vector3<T> = normalize(center - eye)
let s:Vector3<T> = normalize(cross(up, f))
let u:Vector3<T> = cross(f, s)
let s:Vector3<T> = normalize(cross(f, up))
let u:Vector3<T> = cross(s, f)

let r30:T = -dot(s, eye)
let r31:T = -dot(u, eye)
Expand Down

0 comments on commit 3995404

Please sign in to comment.