Skip to content

Commit

Permalink
Optimized quaternion log function #554
Browse files Browse the repository at this point in the history
  • Loading branch information
Groovounet committed Sep 24, 2016
1 parent 9669cf4 commit 0675da4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions glm/gtx/quaternion.inl
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ namespace glm
}
else
{
T QuatLen = sqrt(Vec3Len * Vec3Len + q.w * q.w);
T t = atan(Vec3Len, T(q.w)) / Vec3Len;
return tquat<T, P>(log(QuatLen), t * q.x, t * q.y, t * q.z);
T QuatLen2 = Vec3Len * Vec3Len + q.w * q.w;
return tquat<T, P>(static_cast<T>(0.5) * log(QuatLen2), t * q.x, t * q.y, t * q.z);
}
}

Expand Down
3 changes: 3 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
## Release notes
#### [GLM 0.9.8.1](https://github.com/g-truc/glm/tree/0.9.8) - 2016-XX-XX
##### Improvements:
- Optimized quaternion log function #554
##### Fixes:
- Fixed GCC warning filtering, replaced -pedantic by -Wpedantic
- Fixed SIMD faceforward bug. #549
Expand Down

0 comments on commit 0675da4

Please sign in to comment.