Quantity

class caris.Quantity

A quantity (value and unit).

value

float – The value

unit

Unit – The unit

__init__((object)arg1, (str)value) → object :

Constructor

Args:
value (str): A string representation of the quantity (e.g. 22.4m)

__init__( (object)arg1, (float)value, (Unit)unit) -> object :

Constructor

Args:
value (float): The quantity valuen value (Unit): The unit.
to((Quantity)self, (Unit)unit) → Quantity :

Convert a quantity to another unit

Args: unit (Unit): The unit to convert to

Returns:A new Quantity in the specified unit