>  Docs Center  >  Libraries  >  JHU/APL/S1R  >  NEAREST
Libraries

NEAREST

NEAREST

Name


      NEAREST

Purpose


      Return multiple of a given step nearest a target value.

Category


Calling Sequence


      v = nearest( s, t, [ vlo, vhi ])

Inputs


      s = step size. in
      t = target value. in

Keyword Parameters


Outputs


      vlo = largest multiple of S <= T. out
      vhi = smallest multiple of S >= T. out
      v = multiple of S nearest T. out

Common Blocks


Notes


Modification History


      R. Sterner 10 Apr, 1986.
      Johns Hopkins University Applied Physics Laboratory.
R. Sterner 2005 Apr 12 --- Upgraded to work for big numbers.
  Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
  This software may be used, copied, or redistributed as long as it is not
  sold and this copyright notice is reproduced on each copy made. This
  routine is provided as is without any express or implied warranties
  whatsoever. Other limitations apply as described in the file disclaimer.txt.



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us