Bug in operator* for rgba_color with integral types
ericr732005 opened this issue · 1 comments
ericr732005 commented
Hi,
Looking at xio2d_impl.h, I bumped into this code for operator*:
rhs = ::std::max(::std::min(rhs, 1.0F), 0.0F);
(and the same for lhs for the symmetrical operator*).
operator* comes in two flavors, one for floating point types, and one for integral types. For integral types, this line seems to be a bug as rhs will then always be 0 or 1 (and it will be divided by 255.0F), while I guess we would like rhs to be between 0 and 255.
Regards
Eric
mikekazakov commented
Thanks for the report, the issue is fixed.