<table><tr><td style="">dhaumann added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D24321">View Revision</a></tr></table><br /><div><div><p>As far as I understand, the reasoning of <a href="https://phabricator.kde.org/p/cullmann/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;">@cullmann</a> is that 0.1 cannot be accurately be represented by a computer. Following <a href="https://stackoverflow.com/questions/46249288/how-to-determine-a-number-closest-to-a-given-number-in-floating-point" class="remarkup-link" target="_blank" rel="noreferrer">this discussion</a>, the number 0.1 will turn into either 0.09999999999999999167332731531132594682276248931884765625 or 0.1000000000000000055511151231257827021181583404541015625.</p>

<p>And <a href="https://phabricator.kde.org/p/cullmann/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;">@cullmann</a>'s point here is: Do we really want to have calls of QPainter::scale() with these above numbers? It is quite obvious that you will never get any full pixels with such scaling factors.</p>

<p>That's why i) proposing a coarser step width, and ii) numbers that CAN be represented lead to the proposed patch of 0.25, 0.5, 0.75, ... These numbers are perfectly representable by a computer without rounding artifacts, and multiplying with ints you may even have a chance of getting a nice int again in many cases, which is exactly what you want if you want, since the chance of getting full pixels is much higher.</p>

<p>So +1 for this patch, it does make a lot of sense (in fact, based on the above reasoning, I'd even drop the option of setting 0.05, 0.1, ... via the advanced button). Please reconsider this patch.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R104 KScreen</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D24321">https://phabricator.kde.org/D24321</a></div></div><br /><div><strong>To: </strong>ngraham, VDG, Plasma, romangg<br /><strong>Cc: </strong>dhaumann, davidedmundson, ouwerkerk, GB_2, ndavis, cullmann, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>