diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-01-28 10:35:33 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-01-28 10:35:33 +0000 |
| commit | 491ac453512ac1982f62fc0d2a310586427601d7 (patch) | |
| tree | 259cb4f798f5d865a10f0391ea3fe6a3a68bb25f /test/colour_conversion_test.cc | |
| parent | 3c735aa41fb24dbcd5ac15fba4d60e1554e124c6 (diff) | |
Some OS X build fixes.
Diffstat (limited to 'test/colour_conversion_test.cc')
| -rw-r--r-- | test/colour_conversion_test.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/colour_conversion_test.cc b/test/colour_conversion_test.cc index 4640b36c..7193a5ef 100644 --- a/test/colour_conversion_test.cc +++ b/test/colour_conversion_test.cc @@ -31,10 +31,10 @@ static void check_gamma (shared_ptr<const TransferFunction> tf, int bit_depth, float gamma) { double const * lut = tf->lut (bit_depth); - int const count = pow (2, bit_depth); + int const count = rint (pow (2.0, bit_depth)); for (int i = 0; i < count; ++i) { - BOOST_CHECK_CLOSE (lut[i], pow (double(i) / (count - 1), gamma), 0.001); + BOOST_CHECK_CLOSE (lut[i], pow (float(i) / (count - 1), gamma), 0.001); } } @@ -42,7 +42,7 @@ static void check_modified_gamma (shared_ptr<const TransferFunction> tf, int bit_depth, double power, double threshold, double A, double B) { double const * lut = tf->lut (bit_depth); - int const count = pow (2, bit_depth); + int const count = rint (pow (2.0, bit_depth)); for (int i = 0; i < count; ++i) { double const x = double(i) / (count - 1); |
