Пример #1
0
def scale(c, quantitydesc, sysunits, stepfactors):
    return format(
        ms.scale(int(c), parse_quantity_desc(quantitydesc, sysunits),
                 ms.basefactors(stepfactors)), sysunits)
Пример #2
0
def add(quantitydesc1, quantitydesc2, sysunits, stepfactors):
    return format(
        ms.add(parse_quantity_desc(quantitydesc1, sysunits),
               parse_quantity_desc(quantitydesc2, sysunits),
               ms.basefactors(stepfactors)), sysunits)
Пример #3
0
def base_format(quantityvec, sysunits, stepfactors):
    basevalue = str(ms.base(quantityvec, ms.basefactors(stepfactors)))
    return ' '.join([basevalue, sysunits[-1]])
Пример #4
0
def equal(quantitydesc1, quantitydesc2, sysunits, stepfactors):
    return ms.equal(parse_quantity_desc(quantitydesc1, sysunits),
                    parse_quantity_desc(quantitydesc2, sysunits),
                    ms.basefactors(stepfactors))