Commit | Line | Data |
---|---|---|
e9a58b00 | 1 | /* |
6bb465b0 RE |
2 | * Copyright (c) 1980 Regents of the University of California. |
3 | * All rights reserved. The Berkeley software License Agreement | |
4 | * specifies the terms and conditions for redistribution. | |
5 | * | |
6 | * @(#)h_nint.c 5.1 %G% | |
e9a58b00 DW |
7 | */ |
8 | ||
9 | short h_nint(x) | |
10 | float *x; | |
11 | { | |
12 | double floor(); | |
13 | ||
14 | return( (*x)>=0 ? | |
15 | floor(*x + .5) : -floor(.5 - *x) ); | |
16 | } |