[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13247] trunk/blender/source/blender/imbuf /intern/dds/DirectDrawSurface.cpp: changed sqrtf to sqrt to make solaris and other platforms happy.

Kent Mein mein at cs.umn.edu
Tue Jan 15 19:54:34 CET 2008


Revision: 13247
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13247
Author:   sirdude
Date:     2008-01-15 19:54:34 +0100 (Tue, 15 Jan 2008)

Log Message:
-----------
changed sqrtf to sqrt to make solaris and other platforms happy.

Kent

Modified Paths:
--------------
    trunk/blender/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp

Modified: trunk/blender/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
===================================================================
--- trunk/blender/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp	2008-01-15 18:43:29 UTC (rev 13246)
+++ trunk/blender/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp	2008-01-15 18:54:34 UTC (rev 13247)
@@ -61,6 +61,7 @@
 
 #include <stdio.h> // printf
 #include <math.h>  // sqrt
+#include <sys/types.h>
 
 /*** declarations ***/
 
@@ -769,7 +770,7 @@
 	float nx = 2 * (x / 255.0f) - 1;
 	float ny = 2 * (y / 255.0f) - 1;
 	float nz = 0.0f;
-	if (1 - nx*nx - ny*ny > 0) nz = sqrtf(1 - nx*nx - ny*ny);
+	if (1 - nx*nx - ny*ny > 0) nz = sqrt(1 - nx*nx - ny*ny);
 	uint8 z = clamp(int(255.0f * (nz + 1) / 2.0f), 0, 255);
 	
 	return Color32(x, y, z);





More information about the Bf-blender-cvs mailing list