Index Page
cspice_brckti
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 

Abstract
I/O
Examples
Particulars
Required Reading
Version
Index_Entries

Abstract


   CSPICE_BRCKTI brackets an integer number. That is, given a 
   number and an acceptable interval, make sure that the number exists 
   in the interval. (If the number is already in the interval, do
   nothing. If not, set it to the nearest endpoint of the interval.)

   For important details concerning this module's function, please refer to
   the CSPICE routine brckti_c.

I/O

   
   Given:
   
      number   a scalar integer value
      
      min,
      max      the scalar integer values for the lower and 
               upper bounds for number, the order is not important
    
    the call:
    
      bracket = cspice_brckti( number, min, max )
         
   returns:
   
      an integer value: the input number, if it was already in the 
      interval provided, otherwise the returned value is the nearest 
      bound of the interval 
   

Examples


   Any numerical results shown for this example may differ between
   platforms as the results depend on the SPICE kernels used as input
   and the machine specific arithmetic implementation.

   
      bracket = cspice_brckti( number, min, max )
   
      ;;
      ;; Is 'number' within [min,max]? If not,
      ;; set 'number' to the value of the nearest
      ;; bracket endpoint.
      ;;
      ;; If so, do nothing to 'number'. 
      ;;
      if ( number lt min ) then number = min
      if ( number gt max ) then number = max
      
      bracket = number

Particulars


   None.

Required Reading


   ICY.REQ

Version


   -Icy Version 1.0.2, 19-JAN-2009, EDW (JPL)

      Edits to header text and spelling correction.
 
   -Icy Version 1.0.0, 16-JUN-2003, EDW (JPL)

Index_Entries

 
   bracket an integer value within an interval 
 



Wed Apr  5 17:57:59 2017