Page 3 of 3

Posted: Sat Dec 31, 2005 11:30 am
by Deus
this means: Close this thread ASAP ;)

Posted: Sat Dec 31, 2005 11:44 am
by ouroboro
Deus wrote:this means: Close this thread ASAP ;)
lol, nooooooo! if i win i deserve to know so i can rub Gotenks' nose in it! j/k <3

Posted: Sat Dec 31, 2005 12:20 pm
by gotenks
lol, it still has to be manually rounded when converted to a byte, or else it is truncated... bani can answer the question, since he has more code then we do

Posted: Sat Feb 18, 2006 4:55 pm
by Ragnar_40k
You miss some point. When you convert a float value to integer then its simply truncated (in C). But ET (and OpenGL) don't convert these values to integer at all - they handle it as float. So you should try to pick the closest possible value, when converting it to a byte value (and therefore use "mathematical" rounding).

Another point is that these color values pass through a lot of adjustments (e.g. due to brightness settings). So the best way the get the color codes might be to run ET with default settings, to take a screen shot from a color list (generated by a script) and then to pick the color values from the screenshot.

Posted: Sat Feb 18, 2006 5:15 pm
by bacon
gotenks wrote:lol, it still has to be manually rounded when converted to a byte, or else it is truncated... bani can answer the question, since he has more code then we do
Please think of the PHP kiddies and refer to truncate as floor from now on...epseically since it does what you're telling us is happening more accurately (be more specific when you say truncate mmmmmkay?).