% Simple  function  to find maximum 
% out of two user supplied numbers x1 and x2
% by Eugeniy Mikhailov
% 08/15/2010
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% x1 and x2  are user supplied inputs
% ret is return value which hold the lagest of two input values
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function ret=find_max(x1,x2)
	% first we compare 2 numbers
	if (x1 >= x2)
		% notice greater or equal comparison
		% otherwise 'ret' value will not be assigned 
		% for the case when x1 equals to x2
		ret = x1;
	else 
		ret = x2;
	end
end


