d3drm: Implement D3DRMVectorRandom.
This commit is contained in:
parent
819362d0f7
commit
f9e6f42b86
|
@ -13,7 +13,7 @@
|
|||
@ stdcall D3DRMVectorDotProduct(ptr ptr)
|
||||
@ stdcall D3DRMVectorModulus(ptr)
|
||||
@ stdcall D3DRMVectorNormalize(ptr)
|
||||
@ stub D3DRMVectorRandom
|
||||
@ stdcall D3DRMVectorRandom(ptr)
|
||||
@ stub D3DRMVectorReflect
|
||||
@ stub D3DRMVectorRotate
|
||||
@ stdcall D3DRMVectorScale(ptr ptr long)
|
||||
|
|
|
@ -92,6 +92,16 @@ LPD3DVECTOR WINAPI D3DRMVectorNormalize(LPD3DVECTOR u)
|
|||
return u;
|
||||
}
|
||||
|
||||
/* Returns a random unit vector */
|
||||
LPD3DVECTOR WINAPI D3DRMVectorRandom(LPD3DVECTOR d)
|
||||
{
|
||||
d->x = rand();
|
||||
d->y = rand();
|
||||
d->z = rand();
|
||||
D3DRMVectorNormalize(d);
|
||||
return d;
|
||||
}
|
||||
|
||||
/* Scale a vector */
|
||||
LPD3DVECTOR WINAPI D3DRMVectorScale(LPD3DVECTOR d, LPD3DVECTOR s, D3DVALUE factor)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue