Re: d3dx9_36: D3DXQuaternionLn computes as if the norm of the input is 1
2012/6/12 Nozomi Kodama <nozomi.kodama(a)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.
2012/6/12 Nozomi Kodama <nozomi.kodama(a)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
2012/6/13 Nozomi Kodama <nozomi.kodama(a)yahoo.com>:
2012/6/12 Nozomi Kodama <nozomi.kodama(a)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.
participants (2)
-
Matteo Bruni -
Nozomi Kodama