MathUtils#

class ansys.aedt.core.generic.math_utils.MathUtils#

MathUtils is a utility class that provides methods for numerical comparisons and checks.

Methods

MathUtils.atan2(y, x)

Implementation of atan2 that does not suffer from the following issues: math.atan2(0.0, 0.0) = 0.0 math.atan2(-0.0, 0.0) = -0.0 math.atan2(0.0, -0.0) = 3.141592653589793 math.atan2(-0.0, -0.0) = -3.141592653589793 and returns always 0.0.

MathUtils.fix_negative_zero(value)

Fix the negative zero.

MathUtils.is_close(a, b[, ...])

Whether two numbers are close to each other given relative and absolute tolerances.

MathUtils.is_equal(a, b[, eps])

Return True if numbers a and b are equal within a small epsilon tolerance.

MathUtils.is_scalar_number(x)

Check if a value is a scalar number (int or float).

MathUtils.is_zero(x[, eps])

Check if a number is close to zero within a small epsilon tolerance.

Attributes