ostk.physics.unit.Mass¶
- class Mass(
- self: ostk.physics.unit.Mass,
- arg0: ostk.core.type.Real,
- arg1: ostk::physics::unit::Mass::Unit,
- arg0: ostk.core.type.Real,
Bases:
pybind11_object
Mass.
https://en.wikipedia.org/wiki/Mass
Constructor.
- Parameters:
aReal (Real) -- A real number.
aUnit (Mass.Unit) -- A mass unit.
Methods
Get the mass unit.
Convert mass to kilograms.
Convert mass to unit.
Check if the mass is defined.
Create a mass in kilograms.
Parse a mass.
Get string from unit.
Get symbol from unit.
Convert mass to string.
Get an undefined mass.
- class Unit(self: ostk.physics.unit.Mass.Unit, value: int)¶
Bases:
pybind11_object
Members:
- Undefined :
Undefined.
- Kilogram :
Kilogram (SI).
- Pound :
Pound.
- Tonne :
Tonne.
- property name¶
- get_unit(self: ostk.physics.unit.Mass) ostk::physics::unit::Mass::Unit ¶
Get the mass unit.
- Returns:
Mass unit.
- Return type:
- in_kilograms(self: ostk.physics.unit.Mass) ostk.core.type.Real ¶
Convert mass to kilograms.
- Returns:
Mass in kilograms.
- Return type:
- in_unit(
- self: ostk.physics.unit.Mass,
- arg0: ostk::physics::unit::Mass::Unit,
Convert mass to unit.
- Returns:
Mass in unit.
- Return type:
- is_defined(self: ostk.physics.unit.Mass) bool ¶
Check if the mass is defined.
- Returns:
True if defined.
- Return type:
- static kilograms(arg0: ostk.core.type.Real) ostk.physics.unit.Mass ¶
Create a mass in kilograms.
- Returns:
A mass in kilograms.
- Return type:
- static parse(arg0: ostk.core.type.String) ostk.physics.unit.Mass ¶
Parse a mass.
- Returns:
A mass.
- Return type:
- static string_from_unit(arg0: ostk::physics::unit::Mass::Unit) ostk.core.type.String ¶
Get string from unit.
- Returns:
A string.
- Return type:
- static symbol_from_unit(arg0: ostk::physics::unit::Mass::Unit) ostk.core.type.String ¶
Get symbol from unit.
- Returns:
A symbol.
- Return type:
- to_string(
- self: ostk.physics.unit.Mass,
- aPrecision: ostk.core.type.Integer = Undefined,
Convert mass to string.
- static undefined() ostk.physics.unit.Mass ¶
Get an undefined mass.
- Returns:
An undefined mass.
- Return type: