Re: koraX's utils -
25-03-2005
just looking a bit thru it, looks nice
some suggestions : accordinging to some measurements I did quite some time ago, dividing all components by a factor is faster when you calculate 1/factor first and then multiply each of them, although this might be slightly less accurate due to floating point imprecisions, but this shouldnt be a problem with bot stuff at all. you did that already in the normalize function I see.
btw, and why isnt the RGB class derived from the vector class ? since then you had all arithmetrics stuff like + - whatever there too, which might be handy together with a clamp function.
|