src/Colourful/Utils/CylindricalFormulas.cs
/// <summary>
/// Converts a vector in form of Lightness, Chroma, Hue into Lightness, Chroma1, Chroma2.
/// </summary>
Converts a vector in form of Lightness, Chroma, Hue into Lightness, Chroma1, Chroma2.
Converts a vector in form of Lightness Chroma Hue into Lightness Chroma1 Chroma2 .
public static double[] ConvertFromLCh(in double[] sourceVector)
        {
            double C = sourceVector[1], hDegrees = sourceVector[2];
            var hRadians = DegreeToRadian(in hDegrees);
            var a = C * Cos(hRadians);
            var b = C * Sin(hRadians);
            var targetVector = new[] { sourceVector[0], a, b };
            return targetVector;
        }
public static double [ ] ConvertFromLCh ( in double [ ] sourceVector ) { double C = sourceVector [ 1 ] , hDegrees = sourceVector [ 2 ] ; var hRadians = DegreeToRadian ( in hDegrees ) ; var a = C * Cos ( hRadians ) ; var b = C * Sin ( hRadians ) ; var targetVector = new [ ] { sourceVector [ 0 ] , a , b } ; return targetVector ; }
Converts a vector in form of Lightness, Chroma, Hue into Lightness, Chroma1, Chroma2.
Converts a vector in form of Lightness Chroma Hue into Lightness Chroma1 Chroma2 .
double[]
in