mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
dsound: Make AngleBetweenVectorsRad when vectors have no magnitude.
This commit is contained in:
parent
545a774fcc
commit
3f965d582f
@ -110,6 +110,9 @@ static inline D3DVALUE AngleBetweenVectorsRad (const D3DVECTOR *a, const D3DVECT
|
||||
product = ScalarProduct (a,b);
|
||||
la = VectorMagnitude (a);
|
||||
lb = VectorMagnitude (b);
|
||||
if (!la || !lb)
|
||||
return 0;
|
||||
|
||||
cos = product/(la*lb);
|
||||
angle = acos(cos);
|
||||
TRACE("angle between (%f,%f,%f) and (%f,%f,%f) = %f radians (%f degrees)\n", a->x, a->y, a->z, b->x,
|
||||
|
Loading…
Reference in New Issue
Block a user