function V=tetravolume(a,b,c,d);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% tetravolume.m                  %
% written 2/28/00 by ben olding  %
% finds volume of tetrahedron    %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%             [ax bx cx dx]
% V = 1/6 det [ay by cy dy]
%             [az bz cz dz]
%             [ 1  1  1  1]

M=[a',b',c',d'];
M(4,:)=[1 1 1 1];

V = 1/6*abs(det(M));
