Accuracy
#
- class ansys.geometry.core.misc.accuracy.Accuracy#
Decimal precision evaluations for math operations.
Overview#
Return the |
|
Return the |
|
Return the |
|
Check if the comparison length is equal to the reference length. |
|
Compare two double values. |
|
Compare two doubles given the relative and absolute tolerances. |
|
Check if the length is greater than the reference length. |
|
Check if the length is less than or equal to the reference length. |
|
Check if the length is within the length accuracy of exact zero. |
|
Check if the length is below a negative length accuracy. |
|
Check if the length is above a positive length accuracy. |
|
Check if the length is within the angle accuracy of exact zero. |
|
Check if the angle is below a negative angle accuracy. |
|
Check if the angle is above a positive angle accuracy. |
|
Check if two values are inside a relative and absolute tolerance. |
Import detail#
from ansys.geometry.core.misc.accuracy import Accuracy
Method detail#
- static Accuracy.length_accuracy() ansys.geometry.core.typing.Real #
Return the
LENGTH_ACCURACY
constant.
- static Accuracy.angle_accuracy() ansys.geometry.core.typing.Real #
Return the
ANGLE_ACCURACY
constant.
- static Accuracy.double_accuracy() ansys.geometry.core.typing.Real #
Return the
DOUBLE_ACCURACY
constant.
- static Accuracy.length_is_equal(comparison_length: ansys.geometry.core.typing.Real, reference_length: ansys.geometry.core.typing.Real) bool #
Check if the comparison length is equal to the reference length.
- Returns:
- bool
True
if the comparison length is equal to the reference length within the length accuracy,False
otherwise.
Notes
The check is done up to the constant value specified for
LENGTH_ACCURACY
.
- static Accuracy.equal_doubles(a: ansys.geometry.core.typing.Real, b: ansys.geometry.core.typing.Real)#
Compare two double values.
- static Accuracy.compare_with_tolerance(a: ansys.geometry.core.typing.Real, b: ansys.geometry.core.typing.Real, relative_tolerance: ansys.geometry.core.typing.Real, absolute_tolerance: ansys.geometry.core.typing.Real) ansys.geometry.core.typing.Real #
Compare two doubles given the relative and absolute tolerances.
- static Accuracy.length_is_greater_than_or_equal(comparison_length: ansys.geometry.core.typing.Real, reference_length: ansys.geometry.core.typing.Real) bool #
Check if the length is greater than the reference length.
- Returns:
- bool
True
if the comparison length is greater than the reference length within the length accuracy,False
otherwise.
Notes
The check is done up to the constant value specified for
LENGTH_ACCURACY
.
- static Accuracy.length_is_less_than_or_equal(comparison_length: ansys.geometry.core.typing.Real, reference_length: ansys.geometry.core.typing.Real) bool #
Check if the length is less than or equal to the reference length.
- Returns:
- bool
True
if the comparison length is less than or equal to the reference length within the length accuracy,False
otherwise.
Notes
The check is done up to the constant value specified for
LENGTH_ACCURACY
.
- static Accuracy.length_is_zero(length: ansys.geometry.core.typing.Real) bool #
Check if the length is within the length accuracy of exact zero.
- Returns:
- bool
True
if the length is within the length accuracy of exact zero,False
otherwise.
- static Accuracy.length_is_negative(length: ansys.geometry.core.typing.Real) bool #
Check if the length is below a negative length accuracy.
- Returns:
- bool
True
if the length is below a negative length accuracy,False
otherwise.
- static Accuracy.length_is_positive(length: ansys.geometry.core.typing.Real) bool #
Check if the length is above a positive length accuracy.
- Returns:
- bool
True
if the length is above a positive length accuracy,False
otherwise.
- static Accuracy.angle_is_zero(angle: ansys.geometry.core.typing.Real) bool #
Check if the length is within the angle accuracy of exact zero.
- Returns:
- bool
True
if the length is within the angle accuracy of exact zero,False
otherwise.
- static Accuracy.angle_is_negative(angle: ansys.geometry.core.typing.Real) bool #
Check if the angle is below a negative angle accuracy.
- Returns:
- bool
True
if the angle is below a negative angle accuracy,False
otherwise.
- static Accuracy.angle_is_positive(angle: ansys.geometry.core.typing.Real) bool #
Check if the angle is above a positive angle accuracy.
- Returns:
- bool
True
if the angle is above a positive angle accuracy,False
otherwise.
- static Accuracy.is_within_tolerance(a: ansys.geometry.core.typing.Real, b: ansys.geometry.core.typing.Real, relative_tolerance: ansys.geometry.core.typing.Real, absolute_tolerance: ansys.geometry.core.typing.Real) bool #
Check if two values are inside a relative and absolute tolerance.
- Parameters:
- a
Real
First value.
- b
Real
Second value.
- relative_tolerance
Real
Relative tolerance accepted.
- absolute_tolerance
Real
Absolute tolerance accepted.
- a
- Returns:
- bool
True
if the values are inside the accepted tolerances,False
otherwise.