d3dx9_36: D3DXQuaternionLn computes as if the norm of the input is 1

Matteo Bruni matteo.mystral at gmail.com
Wed Jun 13 07:14:19 CDT 2012


2012/6/13 Nozomi Kodama <nozomi.kodama at yahoo.com>:
>>>2012/6/12 Nozomi Kodama <nozomi.kodama at yahoo.com>:
>>>
>>> +    if ( (pq->w >= 1.0f) || (pq->w == -1.0f) )
>>
>>I think the second comparison should be '<=', if you want to avoid getting
>> NaNs.
>
> I checked in Vista.  D3DX accepts -1.0f as input and returns what the patch
> does.
>
> However, any value < -1.0f is a unacceptable value for D3DX ( D3DX returns
> (-1#IND00,-1#IND00,-1#IND00,-1#IND00) ).
>
>
> Best regards
> Nozomi

Oh, so it actually returns NaNs. Interesting...

So the patch is fine as it is. Maybe you could try to add such a case
to the tests, if it doesn't get too tricky. You could check for
something like gotquat.x != gotquat.x, which should return true only
if gotquat.x is NaN.



More information about the wine-devel mailing list