www.delorie.com/archives/browse.cgi | search |
From: | Derek Greene <topcoder AT mindspring DOT com> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Round function? |
Date: | Thu, 29 Oct 1998 13:40:31 -0500 |
Organization: | MindSpring Enterprises |
Lines: | 17 |
Message-ID: | <3638B69E.DFB4EF4F@mindspring.com> |
References: | <Pine DOT SUN DOT 3 DOT 91 DOT 981029173422 DOT 19933F-100000 AT is> |
NNTP-Posting-Host: | user-37kboqj.dialup.mindspring.com |
Mime-Version: | 1.0 |
X-Server-Date: | 29 Oct 1998 18:36:49 GMT |
X-Mailer: | Mozilla 4.5 [en] (Win95; I) |
X-Accept-Language: | en |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Thank you Mr. Zaretskii. Derek Greene Eli Zaretskii wrote: > 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 |