:class:`Accuracy` ================= .. py:class:: ansys.geometry.core.misc.accuracy.Accuracy Decimal precision evaluations for math operations. .. !! processed by numpydoc !! .. py:currentmodule:: Accuracy Overview -------- .. tab-set:: .. tab-item:: Static methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~length_accuracy` - Return the ``LENGTH_ACCURACY`` constant. * - :py:attr:`~angle_accuracy` - Return the ``ANGLE_ACCURACY`` constant. * - :py:attr:`~double_accuracy` - Return the ``DOUBLE_ACCURACY`` constant. * - :py:attr:`~length_is_equal` - Check if the comparison length is equal to the reference length. * - :py:attr:`~equal_doubles` - Compare two double values. * - :py:attr:`~compare_with_tolerance` - Compare two doubles given the relative and absolute tolerances. * - :py:attr:`~length_is_greater_than_or_equal` - Check if the length is greater than the reference length. * - :py:attr:`~length_is_less_than_or_equal` - Check if the length is less than or equal to the reference length. * - :py:attr:`~length_is_zero` - Check if the length is within the length accuracy of exact zero. * - :py:attr:`~length_is_negative` - Check if the length is below a negative length accuracy. * - :py:attr:`~length_is_positive` - Check if the length is above a positive length accuracy. * - :py:attr:`~angle_is_zero` - Check if the length is within the angle accuracy of exact zero. * - :py:attr:`~angle_is_negative` - Check if the angle is below a negative angle accuracy. * - :py:attr:`~angle_is_positive` - Check if the angle is above a positive angle accuracy. * - :py:attr:`~is_within_tolerance` - Check if two values are inside a relative and absolute tolerance. Import detail ------------- .. code-block:: python from ansys.geometry.core.misc.accuracy import Accuracy Method detail ------------- .. py:method:: length_accuracy() -> ansys.geometry.core.typing.Real :staticmethod: Return the ``LENGTH_ACCURACY`` constant. .. !! processed by numpydoc !! .. py:method:: angle_accuracy() -> ansys.geometry.core.typing.Real :staticmethod: Return the ``ANGLE_ACCURACY`` constant. .. !! processed by numpydoc !! .. py:method:: double_accuracy() -> ansys.geometry.core.typing.Real :staticmethod: Return the ``DOUBLE_ACCURACY`` constant. .. !! processed by numpydoc !! .. py:method:: length_is_equal(comparison_length: ansys.geometry.core.typing.Real, reference_length: ansys.geometry.core.typing.Real) -> bool :staticmethod: Check if the comparison length is equal to the reference length. :Returns: :ref:`bool ` ``True`` if the comparison length is equal to the reference length within the length accuracy, ``False`` otherwise. .. rubric:: Notes The check is done up to the constant value specified for ``LENGTH_ACCURACY``. .. !! processed by numpydoc !! .. py:method:: equal_doubles(a: ansys.geometry.core.typing.Real, b: ansys.geometry.core.typing.Real) :staticmethod: Compare two double values. .. !! processed by numpydoc !! .. py:method:: 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 :staticmethod: Compare two doubles given the relative and absolute tolerances. .. !! processed by numpydoc !! .. py:method:: length_is_greater_than_or_equal(comparison_length: ansys.geometry.core.typing.Real, reference_length: ansys.geometry.core.typing.Real) -> bool :staticmethod: Check if the length is greater than the reference length. :Returns: :ref:`bool ` ``True`` if the comparison length is greater than the reference length within the length accuracy, ``False`` otherwise. .. rubric:: Notes The check is done up to the constant value specified for ``LENGTH_ACCURACY``. .. !! processed by numpydoc !! .. py:method:: length_is_less_than_or_equal(comparison_length: ansys.geometry.core.typing.Real, reference_length: ansys.geometry.core.typing.Real) -> bool :staticmethod: Check if the length is less than or equal to the reference length. :Returns: :ref:`bool ` ``True`` if the comparison length is less than or equal to the reference length within the length accuracy, ``False`` otherwise. .. rubric:: Notes The check is done up to the constant value specified for ``LENGTH_ACCURACY``. .. !! processed by numpydoc !! .. py:method:: length_is_zero(length: ansys.geometry.core.typing.Real) -> bool :staticmethod: Check if the length is within the length accuracy of exact zero. :Returns: :ref:`bool ` ``True`` if the length is within the length accuracy of exact zero, ``False`` otherwise. .. !! processed by numpydoc !! .. py:method:: length_is_negative(length: ansys.geometry.core.typing.Real) -> bool :staticmethod: Check if the length is below a negative length accuracy. :Returns: :ref:`bool ` ``True`` if the length is below a negative length accuracy, ``False`` otherwise. .. !! processed by numpydoc !! .. py:method:: length_is_positive(length: ansys.geometry.core.typing.Real) -> bool :staticmethod: Check if the length is above a positive length accuracy. :Returns: :ref:`bool ` ``True`` if the length is above a positive length accuracy, ``False`` otherwise. .. !! processed by numpydoc !! .. py:method:: angle_is_zero(angle: ansys.geometry.core.typing.Real) -> bool :staticmethod: Check if the length is within the angle accuracy of exact zero. :Returns: :ref:`bool ` ``True`` if the length is within the angle accuracy of exact zero, ``False`` otherwise. .. !! processed by numpydoc !! .. py:method:: angle_is_negative(angle: ansys.geometry.core.typing.Real) -> bool :staticmethod: Check if the angle is below a negative angle accuracy. :Returns: :ref:`bool ` ``True`` if the angle is below a negative angle accuracy, ``False`` otherwise. .. !! processed by numpydoc !! .. py:method:: angle_is_positive(angle: ansys.geometry.core.typing.Real) -> bool :staticmethod: Check if the angle is above a positive angle accuracy. :Returns: :ref:`bool ` ``True`` if the angle is above a positive angle accuracy, ``False`` otherwise. .. !! processed by numpydoc !! .. py:method:: 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 :staticmethod: Check if two values are inside a relative and absolute tolerance. :Parameters: **a** : :obj:`Real` First value. **b** : :obj:`Real` Second value. **relative_tolerance** : :obj:`Real` Relative tolerance accepted. **absolute_tolerance** : :obj:`Real` Absolute tolerance accepted. :Returns: :ref:`bool ` ``True`` if the values are inside the accepted tolerances, ``False`` otherwise. .. !! processed by numpydoc !!