Functions | |
| bool | is_equal (int|float left, int|float right, float tolerance=1e-7) |
| Compare two numbers for equality, allowing a tolerance for floating point comparison. | |
| None | validate_parameter_types (*Any args, Tuple[Type,...] accepted_types) |
| Validate that all given arguments are instances of the accepted types and are all of the same type. | |
| bool is_equal | ( | int | float | left, |
| int | float | right, | ||
| float | tolerance = 1e-7 ) |
Compare two numbers for equality, allowing a tolerance for floating point comparison.
| left | First number (int or float). |
| right | Second number (int or float). |
| tolerance | Tolerance for floating point comparison. Ignored for integers. |
| None validate_parameter_types | ( | *Any | args, |
| Tuple[Type, ...] | accepted_types ) |
Validate that all given arguments are instances of the accepted types and are all of the same type.
| args | Parameters to validate. |
| accepted_types | Tuple of allowed types (default: (int, float)). |
| TypeError | If any argument is not of an accepted type, or if the arguments have inconsistent types. |