2006-07-05 Roland Levillain <roland(a)lrde.epita.fr>
Fix a color conversion formula.
* ntg/color/color.hh (_from_float:doit): Fix the conversion
formula.
Index: 10.231/integre/ntg/color/color.hh
--- 10.231/integre/ntg/color/color.hh Thu, 15 Sep 2005 17:50:38 +0200 levill_r
(oln/t/20_color.hh 1.8 600)
+++ 10.231(w)/integre/ntg/color/color.hh Wed, 05 Jul 2006 17:41:26 +0200 levill_r
(oln/t/20_color.hh 1.8 600)
@@ -94,7 +94,7 @@
* out_range / in_range
+ float(color_system<n>::lower_bound()));
- // process next componant recursively:
+ // Process next component recursively.
_to_float<n + 1, ncomps, qbits, color_system>::doit(in, out);
}
};
@@ -138,14 +138,14 @@
out[n] = cast::rbound<int_u<qbits> >
((in[n] - float(color_system<n>::lower_bound()))
* out_range / in_range
- + float(color_system<n>::lower_bound()));
+ + float(optraits<T>::min()));
- // process next componant recursively:
+ // Process next component recursively.
_from_float<n + 1, ncomps, qbits, color_system>::doit(in, out);
}
};
- // stop recursion when n == ncomps.
+ // Stop recursion when n == ncomps.
template <unsigned ncomps,
unsigned qbits,
template <unsigned> class color_system>