Find if a point is within a triangle: Difference between revisions
Content added Content deleted
m (→{{header|Wren}}: Changed to Wren S/H) |
Alextretyak (talk | contribs) m (→{{header|11l}}: Named tuple as a base type) |
||
Line 48: | Line 48: | ||
R sqlen(p - p2) |
R sqlen(p - p2) |
||
T Triangle |
T Triangle((Point p1, Point p2, Point p3)) |
||
(Float, Float) p1, p2, p3 |
|||
F (p1, p2, p3) |
|||
.p1 = p1 |
|||
.p2 = p2 |
|||
.p3 = p3 |
|||
F String() |
F String() |
||
R ‘Triangle[’(.p1)‘, ’(.p2)‘, ’(.p3)‘]’ |
R ‘Triangle[’(.p1)‘, ’(.p2)‘, ’(.p3)‘]’ |
||
Line 121: | Line 114: | ||
Point (5.414285714, 14.349206349) is within triangle ? true |
Point (5.414285714, 14.349206349) is within triangle ? true |
||
</pre> |
</pre> |
||
=={{header|Ada}}== |
=={{header|Ada}}== |