temperature: properly deal with NaN coefficients
Before this patch, the call to mul2temp at the end of reoad_defaults() was returning TempK = 24999.647537 tint = -nan The visible effect was that the tint slider was not properly colored (white to green instead of magenta to white to green). The expression computing CAM[k] was clearly wrong. Not only the assignment within the "then" branch of ?: was misleading, but the "else" branch was just a no-op: return 0.0f and throw it away. Fix the expression to make it what the initial author probably intended, i.e. an assignment of a conditional expression to CAM[k]. With this patch, I get: TempK = 6244.398697 tint = 1.002153 and the slider is properly colored.
Showing with 1 addition and 1 deletion