function iA = int(A)
% MATLAB Code Generation library function for the @fi/int

% $INCLUDE(DOC) toolbox/eml/lib/fixedpoint/@embedded/@fi/int.m $
% Copyright 2002-2014 The MathWorks, Inc.
%#codegen
  
eml_allow_mx_inputs;

% Check for ambiguous types and return with the correct size output
if eml_ambiguous_types
    iA = coder.ignoreConst(zeros(size(A)));
    return;
end

% Check for correct number of input arguments i.e. 1
eml_invariant(nargin==1, 'fixed:coder:incorrectNumberOfInputs');

if isscaledtype(A) || isfloat(A)
    iA = storedInteger(A);
else
    % FI datatype not supported
    eml_fi_assert_dataTypeNotSupported('INT');

end
