MSolveQuadratic gives wrong solutions
by Andrew Haydn Grant · in Torque Game Engine · 02/07/2006 (12:38 am) · 1 replies
In mSolveQuadratic_c (mSolver.cc, around line 63):
Those b's ought to be negated:
(-b +- sqrt( b^2 - 4ac)) / 2a
x[0] = ( b + sqrdesc) / den; x[1] = ( b - sqrdesc) / den;
Those b's ought to be negated:
x[0] = (-b + sqrdesc) / den; x[1] = (-b - sqrdesc) / den;
(-b +- sqrt( b^2 - 4ac)) / 2a
About the author
Associate Matt Fairfax
PopCap