
    h              
       P    S r SSKJr  S\S\4S jrS\S-  S\S	\S\\\4   4S
 jrg)z:
Utility functions used for classic control environments.
    )SupportsFloatxreturnc                 n     [        U 5      n U $ ! [        [        4 a  n[        SU  S35      UeSnAff = f)z8Verify parameter is a single number and cast to a float.zAn option (z$) could not be converted to a float.N)float
ValueError	TypeError)r   es     ^/home/james-whalen/.local/lib/python3.13/site-packages/gymnasium/envs/classic_control/utils.pyverify_number_and_castr      sI    W!H H 	" W;qc)MNOUVVWs    4/4optionsNdefault_lowdefault_highc                     U c  X4$ SU ;   a  U R                  S5      OUnSU ;   a  U R                  S5      OUn[        U5      n[        U5      nX4:  a  [        SU SU S35      eX44$ )ap  
This function can be called during a reset() to customize the sampling
ranges for setting the initial state distributions.

Args:
  options: Options passed in to reset().
  default_low: Default lower limit to use, if none specified in options.
  default_high: Default upper limit to use, if none specified in options.

Returns:
  Tuple of the lower and upper limits.
lowhighzLower bound (z#) must be lower than higher bound (z).)getr   r   )r   r   r   r   r   s        r   maybe_parse_reset_boundsr      s     (( % 0'++e
kC"(G"37;;vD !
%C!$'D
zC5 CD6L
 	
 9    )__doc__typingr   r   r   dicttupler    r   r   <module>r      sT    !m  D[',<A
5%<r   