Commit 70a1cef5 authored by David Adam's avatar David Adam Committed by Alexandre Julliard

d3drm: Implement D3DVectorSubtract.

parent f50800b2
......@@ -17,7 +17,7 @@
@ stub D3DRMVectorReflect
@ stub D3DRMVectorRotate
@ stub D3DRMVectorScale
@ stub D3DRMVectorSubtract
@ stdcall D3DRMVectorSubtract(ptr ptr ptr)
@ stub Direct3DRMCreate
@ stub DllCanUnloadNow
@ stub DllGetClassObject
......@@ -40,3 +40,12 @@ LPD3DVECTOR WINAPI D3DRMVectorAdd(LPD3DVECTOR d, LPD3DVECTOR s1, LPD3DVECTOR s2)
d->z=s1->z + s2->z;
return d;
}
/* Subtract Two Vectors */
LPD3DVECTOR WINAPI D3DRMVectorSubtract(LPD3DVECTOR d, LPD3DVECTOR s1, LPD3DVECTOR s2)
{
d->x=s1->x - s2->x;
d->y=s1->y - s2->y;
d->z=s1->z - s2->z;
return d;
}
......@@ -41,6 +41,11 @@ void VectorTest(void)
D3DRMVectorAdd(&r,&u,&v);
e.x=6.0;e.y=6.0;e.z=1.0;
expect_vec(e,r);
/*_______________________VectorSubtract__________________________*/
D3DRMVectorSubtract(&r,&u,&v);
e.x=-2.0;e.y=-2.0;e.z=1.0;
expect_vec(e,r);
}
START_TEST(vector)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment