is_close#
- static MathUtils.is_close(a: float, b: float, relative_tolerance: float = 1e-09, absolute_tolerance: float = 0.0) bool#
Whether two numbers are close to each other given relative and absolute tolerances.
- Parameters:
- Returns:
- bool
Trueif the two numbers are closed,Falseotherwise.
Examples
>>> from ansys.aedt.core.generic.math_utils import MathUtils >>> MathUtils.is_close(1.0, 1.0 + 1e-10) True