| delorie.com/archives/browse.cgi | search |
| Date: | Thu, 29 Oct 1998 17:35:44 +0200 (IST) |
| From: | Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> |
| X-Sender: | eliz AT is |
| To: | Derek Greene <topcoder AT mindspring DOT com> |
| cc: | djgpp AT delorie DOT com |
| Subject: | Re: Round function? |
| In-Reply-To: | <36374585.CADABD29@mindspring.com> |
| Message-ID: | <Pine.SUN.3.91.981029173422.19933F-100000@is> |
| MIME-Version: | 1.0 |
| Reply-To: | djgpp AT delorie DOT com |
On Wed, 28 Oct 1998, Derek Greene wrote: > Is there a functionf or rounding off real numbers when casting to > integers or will a normal type cast do the trick? TIA DJGPP has a function called `rint' which rounds a number. You need to link with -lm to get it, since it's in libm.a which by default isn't scanned by the linker. Most Unix compiler also support `rint' although it isn't ANSI.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |