15from numbers
import Number
20 return ( isinstance( a, Number )
and isinstance( b, Number ) )
23 return ( ( type( a )
in ( list, tuple ) )
and ( type( b )
in ( list, tuple ) ))
26 return ( len( a ) == len( b ) )
30 return ( abs( a - b ) < epsilon )
50 for i
in range( 0, len( a ) ):
51 result = compareFloatEqual ( a[i], b[i], epsilon )
56 Logging_error(
"Only lists or tuples of equal length can be compared!" )
59 Logging_error(
"Only numbers can be compared!" )
77 for i
in range( 0, len( a ) ):
78 result = compareFloatLessThan ( a[i], b[i] )
83 Logging_error(
"Only lists or tuples of equal length can be compared!" )
86 Logging_error(
"Only numbers can be compared!" )
104from .Logging
import error
as Logging_error, warning
as Logging_warning, info
as Logging_info
_areOfTypeListOrTuple(a, b)
compareFloatLessThanOrEqual(a, b, epsilon=0.0001)
Compare the two given float values if the first is less than or equal to the second.
compareFloatLessThan(a, b)
Compare the two given float values if the first is less than the second.
compareFloatEqual(a, b, epsilon=0.0001)
Compare the given float values or lists of float values for equality.
_areInstancesOfNumber(a, b)