public static function firstHigher(
        array $list,
        float $min = null,
        float $max = null
    ) {
        $bounded_list = array_merge([$min ?? 0, $max ?? 1], $list);

        $min = min($bounded_list);
        $max = max($bounded_list);

        $result = null;
        $higher = $min;

        foreach ($list as $key => $value) {
            $value = Utils::numberLimit($value, $min, $max);
            if ($value == $max) {
                return $key;
            } elseif ($value > $higher) {
                $result = $key;
                $higher = $value;
            }
        }

        return $result;
    }