fix_negative_zero#

static MathUtils.fix_negative_zero(value: int | float | list[int | float | list[NestedScalar]]) → int | float | list[int | float | list[NestedScalar]]#

Fix the negative zero. It supports lists (and nested lists).

Parameters:
valuefloat, List

Value to be fixed.

Returns:
float, List

Fixed value.

Examples

>>> from ansys.aedt.core.generic.math_utils import MathUtils
>>> MathUtils.fix_negative_zero([-0.0, 1.0])
[0.0, 1.0]