From: havoc Date: Sun, 23 Jan 2011 17:08:47 +0000 (+0000) Subject: fix log(2) compile error as C++, should have been log(2.0f) X-Git-Tag: xonotic-v0.5.0~438^2~108 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b4f2a2ebc2e956ddca3396c9a86b4e3ac64dbb0d;p=xonotic%2Fdarkplaces.git fix log(2) compile error as C++, should have been log(2.0f) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10733 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/dpsoftrast.c b/dpsoftrast.c index 014dc60d..602bf113 100644 --- a/dpsoftrast.c +++ b/dpsoftrast.c @@ -2364,7 +2364,7 @@ void DPSOFTRAST_Draw_ProcessTriangles(int firstvertex, int numvertices, int numt mip_edge1mip = (mip_edge1tc[0]*mip_edge1tc[0]+mip_edge1tc[1]*mip_edge1tc[1]) * mip_edge1xymul; // this will be multiplied in the texturing routine by the texture resolution mipdensity = mip_edge0mip < mip_edge1mip ? mip_edge0mip : mip_edge1mip; - y = (int)(log(mipdensity)/log(2) + 0.5f); + y = (int)(log(mipdensity)/log(2.0f) + 0.5f); if (y < 0) y = 0; if (y > texture->mipmaps - 1)