[PATCH] d3dx9: Reduce rounding error in D3DXQuaternionToAxisAngle

Henri Verbeet hverbeet at gmail.com
Thu Nov 9 07:33:37 CST 2017


On 9 November 2017 at 16:45, Alex Henrie <alexhenrie24 at gmail.com> wrote:
> -        *pangle = 2.0f * acosf(pq->w);
> +        *pangle = 2.0f * acos(pq->w); /* acosf has too much rounding error */
Does that rounding error by any chance get better if you replace
"acosf(x)" with "atan2f(sqrtf((1.0f - x) * (1.0f + x)), x)"?



More information about the wine-devel mailing list