Skip to Content

Unit

Quick Facts

PropertyValue
ClassUnit
Modulecenpyunits.Unit
Packagecenpyunits
ReleaseR2025.2.4
Methods5
SubclassesFoot Second Second, Inch Second Second, Meter Second Second, Millimeter Second Second, Degree, Radian, Degree Second Second, Radian Second Second, Radian Second, Radian Minute, Degree Second, Degree Minute, Square Meter, Square Millimeter, Square Inch, Square Foot, Kilogramcubicmeter, Gramcubicmeter, Kilogramcubicmillimeter, Milligramcubicmeter, Ouncecubicinch, Poundcubicinch, Tonnecubicmeter, Farad, Millifarad, Coulomb, Kilocoulomb, Millicoulomb, Statcoulomb, Ampere, Milliampere, Ohm, Milliohm, Joule, Kilojoule, Footpound, Britishthermalunit, Cubic Millimeter Second, Cubic Centimeter Minute, Cubic Inch Minute, Newton, Millinewton, Poundal, Poundforce, Hertz, Millihertz, Kilohertz, Henry, Millihenry, Weberperampere, Micrometer, Millimeter, Centimeter, Decimeter, Meter, Kilometer, Milliinch, Inch, Feet, Yard, Mile, Candelapersquaremeter, Candelapersquaremillimeter, Candelapersquareinch, Candelapersquarefoot, Candela, Tesla, Weberpersquaremillimeter, Weberpersquareinch, Weber, Milliweber, Teslasquaremeter, Teslasquaremillimeter, Milligram, Gram, Kilogram, Tonne, Ounce, Pound, Slug, Percentage, Percentage Decimal, Footpoundforcepersecond, Britishthermalunitpersecond, Watt, Kilowatt, Pascal, Kilopascal, Megapascal, Millipascal, Bar, Poundpersquareinch, Ouncepersquareinch, Millimeter Second, Kilometer Hour, Meter Second, Millimeter Minute, Meter Minute, Inch Second, Feet Second, Mile Hour, Inch Minute, Feet Minute, Standard, Celsius, Kelvin, Fahrenheit, Millisecond, Second, Minute, Hour, Day, Kilovolt, Millivolt, Volt, Cubicmeter, Cubicmillimeter, Cubicinch, Cubicfoot

Inheritance

Quick Start

# Boilerplate Example obj = Unit() result = obj.GetShift()

Method Index

MethodReturnsSummary
__init__None
GetShiftfloatGets the constant offset to be applied on convertion
GetScalefloatGets the scalar factor for conversion.
GetUnitGroupstrGets the unit group for this unit
IsDefaultbool

Lifecycle

__init__

def __init__() -> None

Returns: None

Query Methods

GetShift

def GetShift() -> float

Gets the constant offset to be applied on convertion

Returns: float — constant shift value as float

GetScale

def GetScale() -> float

Gets the scalar factor for conversion.

Returns: float — returns the scalar as float

GetUnitGroup

def GetUnitGroup() -> str

Gets the unit group for this unit

Returns: str — returns the unit group

IsDefault

def IsDefault() -> bool

Returns: bool

Version Notes

This class is documented as of release R2025.2.4.

Was this page helpful?