[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sat, 19 Feb 2011 19:19:57 -0800
> Radians seem cleaner; an argument range of 0-360 only seems
> useful if an interface is primarily user-level (e.g. a spec
> in a web page or something).
Cleaner than what? than [0,360]? than [0,1]? than both?
And why? In particular, why would [0,2*pi] be cleaner than [0,1]?
I agree (if you are saying this) that the input and return values of these
functions should not assume only or even primarily user-level use cases (e.g.
web-page color spec). They should be general functions. This is essentially a
utility library of building-block functions.
IMO, the values should be of the same type (a) for all components (r,g,b,h,s,v),
and (b) for both input and return values. We should not be sometimes passing in
[0,1] for RGB and other times passing in [0,255] for RGB. Similarly for return
values. And we should not use [0,360] for H but [0,1] for S and V.