cleanup and rename

This commit is contained in:
jan 2018-03-28 10:54:15 -07:00
commit 1f332614f2

View file

@ -43,7 +43,7 @@ def build_box(rbounds):
}
def planes_from_box(rbounds):
def planes_from_box(rbounds: numpy.ndarray):
faces = [
(( 0, 0, 1), -rbounds[0, 2]),
(( 0, 0, -1), rbounds[1, 2]),
@ -74,9 +74,3 @@ def planes_from_tetrahedron(vertices: numpy.ndarray):
return [plane for plane in zip(n, d)]
def volume_of_tetrahedron(vertices):
ad, bd, cd = vertices[0:3] - vertices[3]
return -ad @ numpy.cross(bd, cd) / 6