changed sqrtf to sqrt to make solaris and other platforms happy.
authorKent Mein <mein@cs.umn.edu>
Tue, 15 Jan 2008 18:54:34 +0000 (18:54 +0000)
committerKent Mein <mein@cs.umn.edu>
Tue, 15 Jan 2008 18:54:34 +0000 (18:54 +0000)
Kent

source/blender/imbuf/intern/dds/DirectDrawSurface.cpp

index dafe58a40a7cd0f495b7a93717bcc7aae7588f71..f842c756ce1f7d5503571353bb19d6980faa21f9 100644 (file)
@@ -61,6 +61,7 @@
 
 #include <stdio.h> // printf
 #include <math.h>  // sqrt
+#include <sys/types.h>
 
 /*** declarations ***/
 
@@ -769,7 +770,7 @@ static Color32 buildNormal(uint8 x, uint8 y)
        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);