<?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[Rounding Error for Object Positions on iPad Pro 11&quot;]]></title><description><![CDATA[<p dir="auto">I came across a rounding error in the iPad Pro 11" mode (with ratio 199:139).</p>
<p dir="auto">If an object is at the Y position Height/2<br />
And I try the if statement<br />
{ if Obj.pos.y = height/2 }<br />
It turns out they are not equal</p>
<p dir="auto">This is because:<br />
The height/2 = 18.65625<br />
The obj.pos.y = 18.6563</p>
<p dir="auto">So it seems that the position of objects are rounded to the 4th digit.<br />
Is there anyway that you guys could make the precision better?<br />
Thank you!</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hamed" aria-label="Profile: Hamed">@<bdi>Hamed</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/murtaza" aria-label="Profile: Murtaza">@<bdi>Murtaza</bdi></a></p>
]]></description><link>https://forum.hyperpad.com/topic/1104/rounding-error-for-object-positions-on-ipad-pro-11</link><generator>RSS for Node</generator><lastBuildDate>Sat, 17 Oct 2026 12:15:30 GMT</lastBuildDate><atom:link href="https://forum.hyperpad.com/topic/1104.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 06 Dec 2018 19:53:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Rounding Error for Object Positions on iPad Pro 11&quot; on Wed, 02 Jan 2019 23:02:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/davio" aria-label="Profile: davio">@<bdi>davio</bdi></a> said in <a href="/post/7481">Rounding Error for Object Positions on iPad Pro 11"</a>:</p>
<blockquote>
<p dir="auto">1- Set an object's y position to height/2</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/davio" aria-label="Profile: Davio">@<bdi>Davio</bdi></a> you really shouldn't be doing this because there will always be floating point rounding errors like this.</p>
<p dir="auto">If you really need to check positions like that, I suggest checking for a range of values eg. If y &gt; height / 2 + 2 and If y &lt; height / 2  - 2.</p>
]]></description><link>https://forum.hyperpad.com/post/7563</link><guid isPermaLink="true">https://forum.hyperpad.com/post/7563</guid><dc:creator><![CDATA[Hamed]]></dc:creator><pubDate>Wed, 02 Jan 2019 23:02:04 GMT</pubDate></item><item><title><![CDATA[Reply to Rounding Error for Object Positions on iPad Pro 11&quot; on Thu, 06 Dec 2018 21:16:11 GMT]]></title><description><![CDATA[<p dir="auto"><strong>iPad Model:</strong> iPad Pro 10.5" 2nd Generation<br />
<strong>iOS version:</strong> 12.1<br />
<strong>hyperPad Version:</strong> 1.22<br />
<strong>Description:</strong> Object's positions are rounded to the 4th digit automatically instead of saving exact position<br />
<strong>Steps to reproduce:</strong><br />
0- Set aspect ratio to 199:139 (iPad Pro) in the editor<br />
1- Set an object's y position to height/2<br />
2- Create an if statement that says { if object.pos.y = height/2 }<br />
<strong>Additional info:</strong><br />
One workaround is to round both values to the 4th digit and then do the if statement comparing the rounded values. However, since I have many if statements, making the app compatible for 199:139 devices will be tricky.</p>
]]></description><link>https://forum.hyperpad.com/post/7481</link><guid isPermaLink="true">https://forum.hyperpad.com/post/7481</guid><dc:creator><![CDATA[Davio]]></dc:creator><pubDate>Thu, 06 Dec 2018 21:16:11 GMT</pubDate></item></channel></rss>