comparison org/test-creature.org @ 95:e4bcd0c481ba

now with more accurate authorship
author Robert McIntyre <rlm@mit.edu>
date Tue, 10 Jan 2012 08:38:50 -0700
parents 69174ed0f9f6
children 4a9096f31017
comparison
equal deleted inserted replaced
94:69174ed0f9f6 95:e4bcd0c481ba
478 [(.getX v) (.getY v) (.getZ v)]) 478 [(.getX v) (.getY v) (.getZ v)])
479 479
480 (defn inside-triangle? 480 (defn inside-triangle?
481 "Is the point inside the triangle? Now what do we do? 481 "Is the point inside the triangle? Now what do we do?
482 You might want to hold on there" 482 You might want to hold on there"
483 {:author "God"} 483 {:author "Dylan Holmes"}
484 [tri p] 484 [tri p]
485 (let [[vert-1 vert-2 vert-3] (triangle-seq tri)] 485 (let [[vert-1 vert-2 vert-3] (triangle-seq tri)]
486 (and 486 (and
487 (same-side? vert-1 vert-2 vert-3 p) 487 (same-side? vert-1 vert-2 vert-3 p)
488 (same-side? vert-2 vert-3 vert-1 p) 488 (same-side? vert-2 vert-3 vert-1 p)