Found a typo on the property of equations :icon_redface: :icon_redface:

I accidentally switched sin with cos when computing the maximum value of CLFactor (page 9 on the pdf)

The correct formula for a maximum CLFactor is, in fact, given by:

`5*sin(Hue) -2*cos(Hue) <= CLFactor`

So, Hue Maximum is given by:

`HueMax = arctan(2/5) + arcsin (-CLFactor*sqrt(29)/29))`

On the review i´m currently making, it won´t change the limits for X that cannot be bigger then

*1-2/sqrt(29)* but i was forced to try to see the true limits for Hue all over again in order to try to find a common formula to fix the X Axis.

The Hue angle in any means must not exceed 90º and now i came up with 2 real limits for X

YFinal > XFinal

or

YFinal < XFinal

Which one to choose, seems to be related to the White Reference for X.

When White Reference for X is smaller then White Reference for Y, then we must force X to be smaller then Y

and

When White Reference for X is bigger then White Reference for Y, then we must force X to be bigger then Y

The problem is when both are equal. (I´ll see how to handle this too)

Also, X have other limitation that can never be bigger then

*1-2/sqrt(29)*I´m thinking in how to overcome all of this. I could not found a equation for X yet, but at least, found it´s true boundaries. I´m only thinking in how to put all of this together on a way that it can also works on the hundreds of matrices that can be generated from the different colorspaces.

Another thing is that the Threshold computed from X, Y and Z like:

`If X > (216/24389)`

XFinal = X(1/3)

Else

XFinal = X*(841/108) + (16/116)

Endif

Seems to be related to the slope calculated in the gamma fixes. I did not tried to make this Threshold obey the slope yet, because i found a bug on the property of the equations as mentioned. So, i´ll try to fix this and later see if i can really force the threshold to obey the gamma/slope limits.

Thinking

Damn equations

...It´s killing

Why, why, why, CIE didn´t made the proper fixes for all of this things yet ? They do have better conditions to make the proper fix than i do.