Table Of Contents

Previous topic

std.movement.MovableRemote

Next topic

handler

This Page

u

Constructor

class u()

Methods

convert(quantity, targetUnits)
Arguments:
  • quantity (number) – A quantity in this standard units system; e.g. <code>4 * u.foot</code>
  • targetUnits (number) – The units in which to report <code>quantity</code>
Returns:

the numerical value of <code>quantity</code> in the system of units given by <code>targetUnits</code>

Use to pass a value in this unit system to a module expecting a different system of units. Example:

>>> u.convert(42 * u.year, u.week)

2191.5

Attributes

centi

centi

centimeter

centimeter

cm

cm

=u.centimeter

day

day

deci

deci

deg

deg

=u.degree

degree

degree

deka

deka

ft

ft

=u.foot

g

g

=u.gram

gram

gram

hecto

hecto

hour

hour

hr

hr

=u.hour

inch

inch

kg

kg

=u.kilogram

kilo

kilo

kilogram

kilogram

Standard unit of mass.

kilometer

kilometer

km

km

=u.kilometer

lb

lb

=u.pound

lbf

lbf

=u.poundForce

mega

mega

meter

meter

Standard unit of length.

micro

micro

mile

mile

milli

milli

millimeter

millimeter

millisecond

millisecond

min

min

=u.minute

minute

minute

mm

mm

=u.millimeter

ms

ms

=u.millisecond

N

N

=u.newton

newton

newton

Standard unit of force.

ounce

ounce

oz

oz

=u.ounce

pound

pound

poundForce

poundForce

rad

rad

radian

radian

Standard unit of angle measure.

rev

rev

=u.revolution

revolution

revolution

rpm

rpm

s

s

=u.second

second

second

Standard unit of time.

sphere

sphere

squareDegree

squareDegree

sr

sr

=u.steradian

steradian

steradian

Standard unit of solid angle measure.

ton

ton

week

week

year

year