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

m
Common Lisp
m (Common Lisp)
Line 276:
(defun point-inside-or-on-triangle (P A B C)
"Is the point P inside the triangle formed by ABC or on one of the sides?"
(apply #'= (remove '0 (list (side-of-line P A B) (side-of-line P B C) (side-of-line P C A)))) )
 
 
47

edits