diff data/model/PowerOfSqrtTwoZoomConstraint.cpp @ 608:d7f3dfe6f9a4

* solaris build fixes
author Chris Cannam
date Thu, 10 Sep 2009 18:44:45 +0000
parents 166c22eff678
children 06f13a3b9e9e
line wrap: on
line diff
--- a/data/model/PowerOfSqrtTwoZoomConstraint.cpp	Thu Sep 10 14:31:49 2009 +0000
+++ b/data/model/PowerOfSqrtTwoZoomConstraint.cpp	Thu Sep 10 18:44:45 2009 +0000
@@ -44,7 +44,7 @@
 	float val = 1.0, prevVal = 1.0;
 	while (val + 0.01 < blockSize) {
 	    prevVal = val;
-	    val *= sqrt(2);
+	    val *= sqrt(2.f);
 	}
 	size_t rval;
 	if (dir == RoundUp) rval = size_t(val + 0.01);
@@ -70,7 +70,7 @@
 	if (type == 0) {
 	    base = (1 << power);
 	} else {
-	    base = (((unsigned int)((1 << minCachePower) * sqrt(2) + 0.01))
+	    base = (((unsigned int)((1 << minCachePower) * sqrt(2.) + 0.01))
 		    << (power - minCachePower));
 	}