Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 330 vs 331 for /trunk/Source Code/Core/Math/Headers/Quaternion.h

Diff revisions: vs.
  @@ -251,7 +251,10 @@
251 251 size_t j = s_iNext[i];
252 252 size_t k = s_iNext[j];
253 253
254 - fRoot = (T)std::sqrtf((F32)(rotationMatrix.m[i][i]-rotationMatrix.m[j][j]-rotationMatrix.m[k][k] + 1.0f));
254 + fRoot = (T)std::sqrtf((F32)(rotationMatrix.m[i][i] -
255 + rotationMatrix.m[j][j] -
256 + rotationMatrix.m[k][k] +
257 + 1.0f));
255 258 T* apkQuat[3] = { &_elements.x, &_elements.y, &_elements.z };
256 259 *apkQuat[i] = 0.5f*fRoot;
257 260 fRoot = 0.5f/fRoot;
  @@ -355,7 +358,9 @@
355 358
356 359 /// get the shortest arc quaternion to rotate vector 'v' to the target vector 'u'(from Ogre3D!)
357 360 template<typename T>
358 - inline Quaternion<T> rotationFromVToU(const vec3<T>& v, const vec3<T>& u, const vec3<T> fallbackAxis = VECTOR3_ZERO) {
361 + inline Quaternion<T> rotationFromVToU(const vec3<T>& v,
362 + const vec3<T>& u,
363 + const vec3<T> fallbackAxis = VECTOR3_ZERO) {
359 364 // Based on Stan Melax's article in Game Programming Gems
360 365 Quaternion<T> q;
361 366 // Copy, since cannot modify local