function WREM, x, y ;+ ;NAME: ; WREM ; ;PURPOSE: ; To compute the remainder after division. ; ;CATEGORY: ; Simple math. ; ;CALLING SEQUENCE: ; Result = WREM(x,y) ;INPUTS: ; x: numerator ; y: denominator ; ;OUTPUTS: ; The remainder after x is divded by y. ; ;SIDE EFFECTS: ; If x is an array, this function operates element ; by element. ; ;RESTRICTIONS: ; None. ; ;PROCEDURE: ; Remainder = x-n*y where n = FIX(x/y) is the integer ; part of the quotient x/y. ; ;MODIFICATION HISTORY: ; Amara Graps, BAER, October 1994. ; copyright (c) Amara Graps 1995, 1996. ;- n = FIX(x/y) remainder = x - n*y RETURN, remainder end