function [len, len2]=law_cos_len(r2a,r2b,rab,th)
%
% use law of cosines to compute an length in a triangle
%
len2 = (r2a + r2b - 2.0*rab*cos(th));
len = sqrt(len2);
