<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Infinity Code Forum — Weird issue with DistanceBetweenPoints]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=1170</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1170&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Weird issue with DistanceBetweenPoints.]]></description>
		<lastBuildDate>Mon, 20 May 2019 00:45:38 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Weird issue with DistanceBetweenPoints]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=4984#p4984</link>
			<description><![CDATA[<p>Many thanks!<br />It work!<br />The best support ever!</p>]]></description>
			<author><![CDATA[null@example.com (danielesuppo)]]></author>
			<pubDate>Mon, 20 May 2019 00:45:38 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=4984#p4984</guid>
		</item>
		<item>
			<title><![CDATA[Re: Weird issue with DistanceBetweenPoints]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=4982#p4982</link>
			<description><![CDATA[<p>Open the DistanceBetweenPoints method you are using.<br />At the end of the method there will be a check for NaN for Y.<br />Add the same check for X.<br />Example for a method using Vector2:<br /></p><div class="codebox"><pre><code>public static Vector2 DistanceBetweenPoints(Vector2 point1, Vector2 point2)
{
    // ...
    if (float.IsNaN(sizeX)) sizeX = 0; // &lt;--- ADD THIS
    if (float.IsNaN(sizeY)) sizeY = 0;
    return new Vector2(sizeX, sizeY);
}</code></pre></div><p>The same logic for the other methods. <br />Just copy-paste the check line for Y and replace Y to X.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Sun, 19 May 2019 22:41:32 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=4982#p4982</guid>
		</item>
		<item>
			<title><![CDATA[Re: Weird issue with DistanceBetweenPoints]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=4981#p4981</link>
			<description><![CDATA[<p>Yes, but unfortunatley I rely on DistanceBetweenPoints for some maths.<br />Anyway I&#039;ll wait, maybe if you have a minor update just for this bug it would be really appreciated <img src="https://forum.infinity-code.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (danielesuppo)]]></author>
			<pubDate>Sun, 19 May 2019 22:30:58 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=4981#p4981</guid>
		</item>
		<item>
			<title><![CDATA[Re: Weird issue with DistanceBetweenPoints]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=4980#p4980</link>
			<description><![CDATA[<p>1-2 weeks.</p><p>This bug does not require the immediate release of a fix, because you can easily check for NaN on your side.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Sun, 19 May 2019 21:32:55 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=4980#p4980</guid>
		</item>
		<item>
			<title><![CDATA[Re: Weird issue with DistanceBetweenPoints]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=4979#p4979</link>
			<description><![CDATA[<p>Great!<br />Do you know when you will release the new version with this bug corrected?</p>]]></description>
			<author><![CDATA[null@example.com (danielesuppo)]]></author>
			<pubDate>Sun, 19 May 2019 21:27:00 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=4979#p4979</guid>
		</item>
		<item>
			<title><![CDATA[Re: Weird issue with DistanceBetweenPoints]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=4965#p4965</link>
			<description><![CDATA[<p>Hello.</p><p>Thank you for the bug report.<br />The problem has been fixed.<br />In the next version this will work correctly.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Thu, 16 May 2019 17:50:58 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=4965#p4965</guid>
		</item>
		<item>
			<title><![CDATA[Weird issue with DistanceBetweenPoints]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=4962#p4962</link>
			<description><![CDATA[<p>Hello, I&#039;m using&nbsp; <br />OnlineMapsUtils.DistanceBetweenPoints(Vector2 &nbsp; &nbsp; point1,&nbsp; Vector2 point2)</p><p>to calculate the distance between some Vector2 longitude/latitude points.</p><p>It work fine for most of my values, but unexpectedly it fail on a couple of points, because it return a Nan value.<br />I&#039;ve tried using doubles instead of Vector2 and it return a totally weird value.</p><p>I really don&#039;t know why, please can you check the picture in attachment and help me to understand what&#039;s going on?<br />Many thanks!</p>]]></description>
			<author><![CDATA[null@example.com (danielesuppo)]]></author>
			<pubDate>Thu, 16 May 2019 16:01:12 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=4962#p4962</guid>
		</item>
	</channel>
</rss>
