ostk.physics.unit.Length¶
- class Length(
- self: ostk.physics.unit.Length,
- arg0: ostk.core.type.Real,
- arg1: ostk::physics::unit::Length::Unit,
- arg0: ostk.core.type.Real,
Bases:
pybind11_object
Length.
https://en.wikipedia.org/wiki/Length
Constructor.
- Parameters:
aReal (Real) -- A real number.
aUnit (Length.Unit) -- A length unit.
Methods
Get the length unit.
Get the length in kilometers.
Get the length in meters.
Get the length in a given unit.
Check if the length is defined.
Check if the length is zero.
Construct a length in kilometers.
Construct a length in meters.
Construct a length in millimeters.
Parse a string and construct a length.
Get the string representation of a length unit.
Get the symbol of a length unit.
Get the string representation of the length.
Get an undefined length.
- class Unit(self: ostk.physics.unit.Length.Unit, value: int)¶
Bases:
pybind11_object
Members:
- Undefined :
Undefined length unit.
- Meter :
Meter (SI).
- Foot :
Foot.
- TerrestrialMile :
Terrestrial mile.
- NauticalMile :
Nautical mile.
- AstronomicalUnit :
Astronomical Unit.
- property name¶
- __add__(
- self: ostk.physics.unit.Length,
- arg0: ostk.physics.unit.Length,
- __mul__(
- self: ostk.physics.unit.Length,
- arg0: ostk.core.type.Real,
- get_unit(self: ostk.physics.unit.Length) ostk::physics::unit::Length::Unit ¶
Get the length unit.
- Returns:
The length unit.
- Return type:
- in_kilometers(self: ostk.physics.unit.Length) ostk.core.type.Real ¶
Get the length in kilometers.
- Returns:
The length in kilometers.
- Return type:
- in_meters(self: ostk.physics.unit.Length) ostk.core.type.Real ¶
Get the length in meters.
- Returns:
The length in meters.
- Return type:
- in_unit(
- self: ostk.physics.unit.Length,
- arg0: ostk::physics::unit::Length::Unit,
Get the length in a given unit.
- Returns:
The length in the given unit.
- Return type:
- is_defined(self: ostk.physics.unit.Length) bool ¶
Check if the length is defined.
- Returns:
True if defined.
- Return type:
- is_zero(self: ostk.physics.unit.Length) bool ¶
Check if the length is zero.
- Returns:
True if zero.
- Return type:
- static kilometers(arg0: ostk.core.type.Real) ostk.physics.unit.Length ¶
Construct a length in kilometers.
- Returns:
A length in kilometers.
- Return type:
- static meters(arg0: ostk.core.type.Real) ostk.physics.unit.Length ¶
Construct a length in meters.
- Returns:
A length in meters.
- Return type:
- static millimeters(arg0: ostk.core.type.Real) ostk.physics.unit.Length ¶
Construct a length in millimeters.
- Returns:
A length in millimeters.
- Return type:
- static parse(arg0: ostk.core.type.String) ostk.physics.unit.Length ¶
Parse a string and construct a length.
- static string_from_unit(
- arg0: ostk::physics::unit::Length::Unit,
Get the string representation of a length unit.
- Returns:
The string representation.
- Return type:
- static symbol_from_unit(
- arg0: ostk::physics::unit::Length::Unit,
Get the symbol of a length unit.
- Returns:
The symbol.
- Return type:
- to_string(
- self: ostk.physics.unit.Length,
- aPrecision: ostk.core.type.Integer = Undefined,
Get the string representation of the length.
- static undefined() ostk.physics.unit.Length ¶
Get an undefined length.
- Returns:
An undefined length.
- Return type: