oln::utils::internal::f_to_float_< DestT, SrcT > Struct Template Reference
#include <se_stat.hh>
List of all members.
|
Static Public Member Functions |
DestT | doit (const SrcT &s) |
Detailed Description
template<typename DestT, typename SrcT>
struct oln::utils::internal::f_to_float_< DestT, SrcT >
This class is used to transform a type to a floating type equivalent.
- Todo:
- FIXME: There should be a way to use the standard conversion, but I failed to find a good one. The problem is that a color<...> derived of vec<..> but the conversion between color and vec should be done through c.to_float().
Example:
** rgb_u8::float_vec_type v = rgb_u8(127, 0, 255);
** // v contains 127., 0., 255 but should contain 0.5, 0,1.
** rgb_u8 c = v;
** // c = (255., 255., 255). Error.
**
** rgb_u8::float_vec_type v2 = f_to_float_<rgb_u8::float_vec_type>
** rgb_u8(127, 0, 255);
** rgb_u8 c2 = v2;
** // c2 = (127, 0, 255). Ok.
**
Definition at line 65 of file se_stat.hh.
The documentation for this struct was generated from the following file:
Generated on Thu Apr 15 20:17:29 2004 for Olena by
1.3.6-20040222