function c = lawcos(a, b, gamma)
%LAWCOS Law of cosines
%   c = lawcos(a, b, gamma) returns the length c of a side of a
%   triangle given the lengths a and b of the other two sides and
%   the angle in degrees gamma between sides a and b.

c = sqrt(a^2 + b^2 - 2 * a * b * cosd(gamma));

end
