Apple interview question

Detect a point in a triangle