function [xNorth, yEast, zDown] = aer2ned(az, elev, slantRange, angleUnit)
%

% Copyright 2012-2023 The MathWorks, Inc.

%#codegen

if nargin < 4 || map.geodesy.isDegree(angleUnit)
    sinfun = @sind;
    cosfun = @cosd;
else
    sinfun = @sin;
    cosfun = @cos;
end

[yEast, xNorth, zUp] = aer2enuFormula(az, elev, slantRange, sinfun, cosfun);
zDown = -zUp;
