Add files via upload

This commit is contained in:
CaptainCarrot 2017-11-21 19:13:35 +01:00 committed by GitHub
parent 5bcb204cde
commit c4cd84c09e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -232,9 +232,9 @@ namespace glm
{ {
mat<3, 3, T, Q> Result; mat<3, 3, T, Q> Result;
Result[2] = -direction; Result[0] = normalize(cross(direction, up)); // new right
Result[0] = normalize(cross(up, Result[2])); Result[1] = cross(Result[0], direction); // new up
Result[1] = cross(Result[2], Result[0]); Result[2] = -direction; // new forward
return quat_cast(Result); return quat_cast(Result);
} }
@ -244,9 +244,9 @@ namespace glm
{ {
mat<3, 3, T, Q> Result; mat<3, 3, T, Q> Result;
Result[2] = direction; Result[0] = normalize(cross(up, direction)); // new right
Result[0] = normalize(cross(up, Result[2])); Result[1] = cross(direction, Result[0]); // new up
Result[1] = cross(Result[2], Result[0]); Result[2] = direction; // new forward
return quat_cast(Result); return quat_cast(Result);
} }