Commit | Line | Data |
---|---|---|
82492b51 KB |
1 | /*- |
2 | * Copyright (c) 1980 The Regents of the University of California. | |
3 | * All rights reserved. | |
6bb465b0 | 4 | * |
ad787160 C |
5 | * This module is believed to contain source code proprietary to AT&T. |
6 | * Use and redistribution is subject to the Berkeley Software License | |
7 | * Agreement and your Software Agreement with AT&T (Western Electric). | |
e9a58b00 DW |
8 | */ |
9 | ||
82492b51 | 10 | #ifndef lint |
ad787160 | 11 | static char sccsid[] = "@(#)h_nint.c 5.2 (Berkeley) 4/12/91"; |
82492b51 KB |
12 | #endif /* not lint */ |
13 | ||
e9a58b00 DW |
14 | short h_nint(x) |
15 | float *x; | |
16 | { | |
17 | double floor(); | |
18 | ||
19 | return( (*x)>=0 ? | |
20 | floor(*x + .5) : -floor(.5 - *x) ); | |
21 | } |