toLch method

List<double> toLch()

Implementation

List<double> toLch() {
  final double hDeg = toDegrees(math.atan2(b, a));

  return [
    l,
    math.sqrt(a * a + b * b),
    if (hDeg < 0) hDeg + 360 else hDeg,
  ];
}