This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
fuzzyequal: compare two floats with tolerance | |
float1: float value1 | |
float2: float value2 | |
tolerance: float tolerance applied while comparing value1 and value2 | |
prec: int precision when comparing float (decimal places) | |
returns: bool (True, False) | |
''' | |
def fuzzyequal (float1, float2, tolerance=0.01, prec=4): |
NewerOlder