Commit 60616873 authored by hybrid's avatar hybrid

Debugged the quat test. Was just a float inaccuracy. Fixed now by using a less picky test.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3821 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 68bbf21e
...@@ -21,8 +21,10 @@ inline bool compareQ(const core::vector3df& v, const core::vector3df& turn=core: ...@@ -21,8 +21,10 @@ inline bool compareQ(const core::vector3df& v, const core::vector3df& turn=core:
q.toEuler(v2); q.toEuler(v2);
v2*=core::RADTODEG; v2*=core::RADTODEG;
v2=v2.rotationToDirection(turn);
if (!v3.equals(v2.rotationToDirection(turn), 0.002f)) // this yields pretty far values sometimes, so don't be too picky
if (!v3.equals(v2, 0.0035f))
{ {
logTestString("Inequality: %f,%f,%f != %f,%f,%f\n", v.X,v.Y,v.Z, v2.X,v2.Y,v2.Z); logTestString("Inequality: %f,%f,%f != %f,%f,%f\n", v.X,v.Y,v.Z, v2.X,v2.Y,v2.Z);
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment