function y = cospi(x)
%MATLAB Code Generation Library Function

%   Copyright 2018-2019 The MathWorks, Inc.
%#codegen

coder.replace;
coder.internal.allowHalfInputs;
eml_invariant(nargin > 0,'MATLAB:minrhs');
eml_invariant(isfloat(x),'Coder:toolbox:unsupportedClass', ...
    mfilename,class(x));
y = coder.internal.applyScalarFunction(mfilename,zeros('like',x), ...
    @coder.internal.scalar.cospi,x);
