Article View: pl.comp.lang.c
Article #297815Re: float -> int - zaokrąglenie w górę i dół
From: Zbych
Date: Sun, 31 Jul 2011 18:29
Date: Sun, 31 Jul 2011 18:29
16 lines
1208 bytes
1208 bytes
W dniu 2011-07-31 20:20, Pawel pisze:
> Witam wszystkich
>
> Czy jest w C++/Qt jakas funkcja ktora by umozliwiala zaokraglanie liczby
> w górę lub w dół w zaleznosci od czesci ulamkowej.
> Np.
> 2.49 = 2
> 2.51 = 3
int round(double d)
{
return (d + 0.5);
}
Taka może być?
Technical Details
Message-ID:
<j1472l$jgp$1@news.mm.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!news.cyf-kr.edu.pl!news.task.gda.pl!news.mm.pl!not-for-mailReferences:
<j146e6$gmt$1@inews.gazeta.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!news.cyf-kr.edu.pl!news.task.gda.pl!news.mm.pl!not-for-mail From: Zbych <abuse@onet.pl> Newsgroups: pl.comp.lang.c Subject: Re: float -> int - zaokrąglenie w górę i dół Date: Sun, 31 Jul 2011 20:29:22 +0200 Organization: Multimedia Polska SA Lines: 18 Message-ID: <j1472l$jgp$1@news.mm.pl> References: <j146e6$gmt$1@inews.gazeta.pl> NNTP-Posting-Host: host-62-141-227-0.tomaszow.mm.pl Mime-Version: 1.0 X-Trace: news.mm.pl 1312137109 19993 62.141.227.0 (31 Jul 2011 18:31:49 GMT) X-Complaints-To: abuse@multimedia.pl NNTP-Posting-Date: Sun, 31 Jul 2011 18:31:49 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20110624 Thunderbird/5.0 In-Reply-To: <j146e6$gmt$1@inews.gazeta.pl> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit