diff options
author | Jeff Muizelaar <jmuizelaar@mozilla.com> | 2011-03-30 10:40:08 -0400 |
---|---|---|
committer | Jeff Muizelaar <jmuizelaar@mozilla.com> | 2011-03-30 10:40:08 -0400 |
commit | d204e2b79c6e7c8e7182eed19a6d79f146d290b5 (patch) | |
tree | f2d241bebfc50510053b76ceeaa46802f099d899 | |
parent | faddc4ccd9814b022af041d93189bc091450f402 (diff) |
Avoid more conversions to double
-rw-r--r-- | iccread.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -502,12 +502,12 @@ static struct curveType *curve_from_table(uint16_t *table, int num_entries) static uint16_t float_to_u8Fixed8Number(float a) { - if (a > (255. + 255./256)) + if (a > (255.f + 255.f/256)) return 0xffff; - else if (a < 0.) + else if (a < 0.f) return 0; else - return floor(a*256. + .5); + return floor(a*256.f + .5f); } static struct curveType *curve_from_gamma(float gamma) |