Skip to content

FloatComparisonOperators

implementation of the comparison operators for float values

FloatComparisonOperators

Canonical path: Utils.ElementFilter.FloatComparisonOperators.FloatComparisonOperators

Definition of class FloatComparisonOperators

are_equal staticmethod

are_equal(value1: float, value2: float) -> bool

check if two float values are equal within a tolerance

Parameters:

  • value1 (float) –

    first float value

  • value2 (float) –

    second float value

Returns:

  • bool

    True if the values are equal within the tolerance, False otherwise

are_not_equal staticmethod

are_not_equal(value1: float, value2: float) -> bool

check if two float values are not equal within a tolerance

Parameters:

  • value1 (float) –

    first float value

  • value2 (float) –

    second float value

Returns: True if the values are not equal within the tolerance, False otherwise

is_greater staticmethod

is_greater(value1: float, value2: float) -> bool

check if the first float value is greater than the second within a tolerance

Parameters:

  • value1 (float) –

    first float value

  • value2 (float) –

    second float value

Returns:

  • bool

    True if the first value is greater than the second within the tolerance, False otherwise

is_greater_equal staticmethod

is_greater_equal(value1: float, value2: float) -> bool

check if the first float value is greater than or equal to the second within a tolerance

Parameters:

  • value1 (float) –

    first float value

  • value2 (float) –

    second float value

Returns:

  • bool

    True if the first value is greater than or equal to the second within the tolerance, False otherwise

is_less staticmethod

is_less(value1: float, value2: float) -> bool

check if the first float value is less than the second within a tolerance

Parameters:

  • value1 (float) –

    first float value

  • value2 (float) –

    second float value

Returns: True if the first value is less than the second within the tolerance, False otherwise

is_less_equal staticmethod

is_less_equal(value1: float, value2: float) -> bool

check if the first float value is less than or equal to the second within a tolerance

Parameters:

  • value1 (float) –

    first float value

  • value2 (float) –

    second float value

Returns: True if the first value is less than or equal to the second within the tolerance, False otherwise

Placeholder