110491Sdlw /* 2*22899Skre * Copyright (c) 1980 Regents of the University of California. 3*22899Skre * All rights reserved. The Berkeley software License Agreement 4*22899Skre * specifies the terms and conditions for redistribution. 5*22899Skre * 6*22899Skre * @(#)h_nint.c 5.1 06/07/85 710491Sdlw */ 810491Sdlw 910491Sdlw short h_nint(x) 1010491Sdlw float *x; 1110491Sdlw { 1210491Sdlw double floor(); 1310491Sdlw 1410491Sdlw return( (*x)>=0 ? 1510491Sdlw floor(*x + .5) : -floor(.5 - *x) ); 1610491Sdlw } 17