function sin_out = cordicsin(theta, niters)
% CORDICSIN(theta, niters) Compute the CORDIC-based approximation to SIN(theta).

% Copyright 2009-2015 The MathWorks, Inc.
%#codegen
coder.allowpcode('plain');
eml_prefer_const(theta);

if coder.target('hdl')      
    if (nargin == 1)
        sin_out = hdlcordicsin(theta);
    else
        sin_out = hdlcordicsin(theta,niters);
    end
else
    if (nargin == 1)
        sin_out = cordicsincos(theta);
    else
        sin_out = cordicsincos(theta, niters);
    end
end
