>> Can anyone tell me of a simple formula to test whether a 2D point is
>> inside a triangle? It is a right triangle with two equal sides. Thanks.
>>
>>
>> Mike
>
> Never mind. I figured if X + Y < 1, then the point is inside the triangle.
How about (X,Y) = (-5,-5) ?
X+Y<1 just tests that it is on one side of one edge.
You also need X>0 and Y>0 for the other two edges of the triangle
(assuming your other two edges run along the axes).
Post a reply to this message
|