Find if a point is within a triangle: Difference between revisions

Content added Content deleted
Line 903: Line 903:
{{out}}
{{out}}
<pre>
<pre>
Triangle is [(1.5, 2.4), (5.1, -3.1), (-3.8, 1.2)]
Point (0, 0) is within triangle? true

Triangle is [(1.5, 2.4), (5.1, -3.1), (-3.8, 1.2)]
Point (0, 1) is within triangle? true

Triangle is [(1.5, 2.4), (5.1, -3.1), (-3.8, 1.2)]
Point (3, 1) is within triangle? false

Triangle is [(0.1, 0.111111), (12.5, 33.3333), (25, 11.1111)]
Point (5.41429, 14.3492) is within triangle? true

Triangle is [(0.1, 0.111111), (12.5, 33.3333), (-12.5, 16.6667)]
Point (5.41429, 14.3492) is within triangle? true
</pre>
</pre>