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

PMOD

PMOD

Name


      PMOD

Purpose


      Find the positive modulo value of a number.

Category


Calling Sequence


      out = pmod(in,m)

Inputs


      in = input value (may be an array). in
      m = divisor. in

Keyword Parameters


Outputs


      out = Remainder of in divided by m. out

Common Blocks


Notes


      Notes: output is always in the range 0 to m-1.
        To see the difference between mod and pmod try:
        plot,(indgen(500)-250) mod 50, yran=[-60,60]
        plot,pmod(indgen(500)-250, 50), yran=[-60,60]

Modification History


      R. Sterner, 1996 May 12
      R. Sterner, 2010 May 04 --- Converted arrays from () to [].
  Copyright (C) 1996, 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