Next / Previous / Contents / TCC Help System / NM Tech homepage

6.3. MixedUnits.singleToMix(): Convert a single value to mixed units

This is the inverse of the .mixToSingle() method. For a MixedUnits instance M, it takes a single value, in the largest unit in the system, and converts it to a sequence of units in mixed form.

M.mixToSingle ( value )

For example, this code would convert 14.876 hours to hours, minutes and seconds, setting hms to a 3-element tuple.

hmsSystem = MixedUnits ( (60, 60) )
hms = hmsSystem.singleToMix ( 14.876 )