function [a1, a2] = alength(b, c, gamma)
%ALENGTH Length of a triangle side
%   [a1, a2] = alength(b, c, gamma) returns the two possible side lengths
%   a1 and a2 of a triangle having side lengths b and c and angle
%   between sides a and b of gamma degrees.

x = b * cosd(gamma);
y = sqrt(c^2 - b^2 * sind(gamma)^2);
a1 = x + y;
a2 = x - y;

end
