<div class="gmail_quote">On Fri, Aug 12, 2011 at 12:59 PM, Michael Mc Donnell <span dir="ltr">&lt;<a href="mailto:michael@mcdonnell.dk">michael@mcdonnell.dk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">Is it ok to use roundf and rintf? They&#39;re both C99 functions.</div>
</blockquote></div><br>
<div>Hello,</div><div><br></div><div>As far as I know C99 is not allowed. However, you can emulate round by doing:</div><div><br></div><div>floorf(val + 0.5f)</div><div><br></div><div>According to [1] floorf is C99 (only floor is C89), but including math.h in wine actually gives you msvcrt&#39;s math.h which is a bit different and doesn&#39;t even have round nor rint. Gdiplus uses floorf [2] so it should be OK.</div>

<div><br></div><div>Octavian</div><div><br></div><div>[1]�<a href="http://linux.die.net/man/3/floorf">http://linux.die.net/man/3/floorf</a></div><div>[2]�<a href="http://source.winehq.org/git/wine.git/?a=search&amp;h=HEAD&amp;st=grep&amp;s=floorf">http://source.winehq.org/git/wine.git/?a=search&amp;h=HEAD&amp;st=grep&amp;s=floorf</a></div>

<div><br></div>