quote:
wanna make sure there's no obvious mistakes in it before I do
Depends what you term a "mistake", but one thing to consider...
What is 0.04045 and 1.055? Or 0.0722? Or 1.8758? etc. You've got *lots* of numbers in your code, with no indication of what they are, which is incredibly confusing to anyone who doesn't know whatever formulae you are implementing.
Hmm, this looks odd:
code:
if ( H < 0 ) ; H += 1
if ( H > 1 ) ; H -= 1
(line 287)
Unless that's some weird construct where semi-colon /doesn't/ terminate the command, it's going to mean that H is going to increment then decrement every time?