 ;;; -*- lexical-binding: t -*-
 
 (require 'cl)
+(cl-float-limits)
 
 ;; Constants -------------------------------------------------------------------
 

            husl/-m
            :initial-value [])))

(defun husl/-max-safe-chroma-for-l (l)
  "For given lightness, returns the maximum chroma. Keeping the chroma value \
below this number will ensure that for any hue, the color is within the RGB gamut."


(defun husl/-length-of-ray-until-intersect (theta x y)
  (let ((length (/ y (- (sin theta) (* x (cos theta))))))
    (cond ((< length 0)
           nil)
          ((isnan length)
           nil)
          (t
           length))))

(defun husl/-max-chroma-for-l-h (l h)
  (let ((h-rad (* (/ h 360) float-pi 2.0)))
