pyunitwizard.are_equal#
- pyunitwizard.are_equal(quantity_or_unit_1, quantity_or_unit_2, same_form=False)[source]#
Compares whether two quantities are similiar within a specified tolerance.
- Parameters:
quantity_or_unit_1 (QuantityOrUnit) – A quantity or a unit
quantity_or_unit_2 (QuantityOrUnit) – A quantity or a unit
relative_tolerance (float) – The relative tolerance to compare the quantities.
same_form (bool)
- Returns:
Whether the quantities or units are similar.
- Return type:
bool