ostk.physics.data.Scalar¶
- class Scalar(
- self: ostk.physics.data.Scalar, - value: ostk.core.type.Real,
- unit: ostk.physics.Unit,
- value: ostk.core.type.Real,
- Bases: - pybind11_object- Scalar quantity. - A scalar quantity is a physical quantity that can be described by a single element of a number field such as a real number, often accompanied by units of measurement. - Reference:
 - Construct a Scalar. - Parameters:
- value (Real) -- Value. 
- unit (Unit) -- Unit. 
 
 - Methods - Get unit. - Get value. - Convert to unit. - Check if the scalar is defined. - Convert to string. - Create an undefined scalar. - get_unit(self: ostk.physics.data.Scalar) ostk.physics.Unit¶
- Get unit. - Returns:
- Unit. 
- Return type:
 
 - get_value(self: ostk.physics.data.Scalar) ostk.core.type.Real¶
- Get value. - Returns:
- Value. 
- Return type:
 
 - in_unit(
- self: ostk.physics.data.Scalar, - unit: ostk.physics.Unit,
- Convert to unit. 
 - is_defined(self: ostk.physics.data.Scalar) bool¶
- Check if the scalar is defined. - Returns:
- True if defined. 
- Return type:
 
 - to_string(
- self: ostk.physics.data.Scalar, - precision: ostk.core.type.Integer = Integer.Undefined(),
- Convert to string. 
 - static undefined() ostk.physics.data.Scalar¶
- Create an undefined scalar. - Returns:
- Undefined scalar. 
- Return type: