%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  regionSampler
%  regionSampler generates a point within the boundaries of the box and tests to
%  to see if the chosen point falls within the desired region (using testRegion)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function point = regionSampler( boxExtreme )


	randMult = boxExtreme(2,1) - boxExtreme(1,1); 
	randAdjust = boxExtreme(1,1); 
	point = randMult .* rand(1, size( boxExtreme,2 ) ) + randAdjust; 
	
% 	while( testRegion( point ) ~= 1 )
% 		point = randMult .* rand(1, size( boxExtreme,2 ) ) + randAdjust; 
% 	end
