[Cg1] [CG1] clamp() in RGBColor

강효승 fordicus at naver.com
Sat Oct 29 01:47:08 CEST 2016

Please deal with 2nd question of mine here. 
>> Clamp() in color.h 
Yes, we know its member variables are declared to be "float"
But we don't know what is going to happen when we actually do render in future with them.
[Q] What is the exact boundary of "RGBColor" in real number?
Is "clamp()" something like below??
Given RGBColor c(R, G, B) 
with R[0,255], G[0,255], B[0,255],
c.clamp() "DO NORMALIZE" the color components
into R[0, 1], G[0, 1], B[0, 1]???
clamp() { [0 : 255] -> [0 : 1] }
The expression clamp or clamps look insufficient without examples.
Furthermore, these problems seem to be recurring problems also in other requirements of assignments.
I wish we could have more detailed info. for our goals, and some example outputs on each function will definitely be helpful.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.cg.uni-saarland.de/pipermail/cg1/attachments/20161029/28d8a709/attachment.html>

More information about the Cg1 mailing list