IRDYn/complie/R1000 DVT GravityModel V1/mr/NearZero.m

17 lines
278 B
Mathematica
Raw Normal View History

2024-12-16 16:33:21 +00:00
function judge = NearZero(near)
% *** BASIC HELPER FUNCTIONS ***
% Takes a scalar.
% Checks if the scalar is small enough to be neglected.
% Example Input:
%
% clear; clc;
% near = -1e-7;
% judge = NearZero(near)
%
% Output:
% judge =
% 1
judge = norm(near) < 1e-6;
end