I'll give you the information of the below.
information:
intersection
pi, p2, p3 are points which a triangle has.
To be inside triangle for intersection equals having same square.
A = Square ( p1 - intersection, p2 - intersection, p3 - intersection )
B = Square ( p1, p2, p3 )
Judgement:
if ( A == B) {
// inside
} else {
// outside
}
Even forr calculation of square of triangle, we could use dot and cross.
Do you think which one is better cross or dot?
https://waitrudweber.hatenablog.com/entry/2019/01/16/001754
https://waitrudweber.hatenablog.com/entry/2019/01/15/202926