JuliaAttic / Color.jl

Basic color manipulation utilities.
Other
47 stars 21 forks source link

Hard-coded constants and updated commenting in DIN99* #30

Closed glennsweeney closed 10 years ago

glennsweeney commented 10 years ago

Minor fixes to the conversion functions. I'm not positive if this will improve performance significantly or not with the Julia JIT, but it's generally good practice to hard-code constants anyhow. Also provided better commenting as to why kch and ke are set to 1; the standard provides for them, but does not recommend their use. If in the future someone really needs them, they are available.

StefanKarpinski commented 10 years ago

These constants don't seem to have full precision. Is that intentional?

glennsweeney commented 10 years ago

I chose the 7 digits of precision as that was what I found elsewhere in the file. However, after looking further, those 7 digits seem to be based off of published values, not internal computation.

In all honesty, I don't believe the additional precision will make a real-world difference, as the DIN standards only provide 5 significant figures for their constants. However, the most recent commit that I pushed updates them to match Julia's output for cosd() and sind().

glennsweeney commented 10 years ago

Also, thanks again @StefanKarpinski for your help and guidance.

StefanKarpinski commented 10 years ago

Got it, @glenn-sweeney. Looks good.