<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[float- Werte runden]]></title><description><![CDATA[<p>Hallo,</p>
<p>wie kann ich am schnellsten einen float- Wert rounden, z.B. auf 3 Nachkomma stellen?<br />
Ich kenne da keine Standard Funktion<br />
Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/204143/float-werte-runden</link><generator>RSS for Node</generator><lastBuildDate>Thu, 08 Oct 2026 07:57:48 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/204143.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 30 Jan 2008 16:42:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to float- Werte runden on Wed, 30 Jan 2008 16:42:00 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>wie kann ich am schnellsten einen float- Wert rounden, z.B. auf 3 Nachkomma stellen?<br />
Ich kenne da keine Standard Funktion<br />
Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1446471</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1446471</guid><dc:creator><![CDATA[LukasBanana]]></dc:creator><pubDate>Wed, 30 Jan 2008 16:42:00 GMT</pubDate></item><item><title><![CDATA[Reply to float- Werte runden on Wed, 30 Jan 2008 16:47:00 GMT]]></title><description><![CDATA[<p>also abrunden ist ganz einfach</p>
<p>((int) (0.111f* 100.0f))/100</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1446479</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1446479</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Wed, 30 Jan 2008 16:47:00 GMT</pubDate></item><item><title><![CDATA[Reply to float- Werte runden on Wed, 30 Jan 2008 16:55:50 GMT]]></title><description><![CDATA[<p>Danke, habs allerdings noch etwas umgeschrieben:</p>
<pre><code class="language-cpp">float(((int)(Value*Precision))) / Precision;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1446491</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1446491</guid><dc:creator><![CDATA[LukasBanana]]></dc:creator><pubDate>Wed, 30 Jan 2008 16:55:50 GMT</pubDate></item><item><title><![CDATA[Reply to float- Werte runden on Wed, 30 Jan 2008 17:04:23 GMT]]></title><description><![CDATA[<p>jo, war ja nur ein Denkanstoss. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";-)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1446496</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1446496</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Wed, 30 Jan 2008 17:04:23 GMT</pubDate></item><item><title><![CDATA[Reply to float- Werte runden on Wed, 30 Jan 2008 18:08:22 GMT]]></title><description><![CDATA[<p>Und wenn du nicht nur abrunden willst, gibts den alten Trick: 0.5 dazu, dann abrunden</p>
<pre><code class="language-cpp">float(((int)(Value*Precision + 0.5f))) / Precision;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1446549</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1446549</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Wed, 30 Jan 2008 18:08:22 GMT</pubDate></item></channel></rss>