Hi, Can you update these comments to this bugzilla entry, #7442?
Thanks, VJ On 3/12/07, H. Verbeet <[EMAIL PROTECTED]> wrote:
On 12/03/07, Vijay Kiran Kamuju <[EMAIL PROTECTED]> wrote: > Hi, > > This is a patch by David Adams, implementing D3DRMVector* functions in d3drm.dll > I am sending the patch to this mailing list as this was posted on > bugzilla and awaiting review. > A few comments: >- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA >+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 0;2110;-130;1, USA I don't think that change should be there. >+ LPD3DVECTOR result=(LPD3DVECTOR)(malloc(sizeof(LPD3DVECTOR))); That and other places in that patch should be using HeapAlloc/HeapFree >+LPD3DVECTOR D3DRMAPI D3DRMVectorRandom(LPD3DVECTOR d) >+{ >+ >+ srand(time(NULL)); >+ d->x=(float)(rand()); >+ d->y=(float)(rand()); >+ d->z=(float)(rand()); >+ TRACE("Random vector=(%f,%f,%f)\n",d->x,d->y,d->z); >+ return d; >+} I'm not sure about this, but I'm thinking it might be better to generate a normalized vector there. - The indentation in D3DRMVectorRotate is a bit of a mess - Writing test cases doesn't hurt, and in this case should be pretty easy