110533Sdlw /* 222964Skre * Copyright (c) 1980 Regents of the University of California. 322964Skre * All rights reserved. The Berkeley software License Agreement 422964Skre * specifies the terms and conditions for redistribution. 522964Skre * 6*23854Sjerry * @(#)r_nint.c 5.2 07/08/85 710533Sdlw */ 810533Sdlw 9*23854Sjerry float r_nint(x) 1010533Sdlw float *x; 1110533Sdlw { 1210533Sdlw double floor(); 1310533Sdlw 1410533Sdlw return( (*x)>=0 ? 1510533Sdlw floor(*x + .5) : -floor(.5 - *x) ); 1610533Sdlw } 17