1*10532Sdlw /* 2*10532Sdlw * "@(#)r_mod.c 1.1" 3*10532Sdlw */ 4*10532Sdlw 5*10532Sdlw double r_mod(x,y) 6*10532Sdlw float *x, *y; 7*10532Sdlw { 8*10532Sdlw double floor(), quotient = *x / *y; 9*10532Sdlw if (quotient >= 0.0) 10*10532Sdlw quotient = floor(quotient); 11*10532Sdlw else 12*10532Sdlw quotient = -floor(-quotient); 13*10532Sdlw return(*x - (*y) * quotient ); 14*10532Sdlw } 15