Пример #1
0
/*!
 * Returns the unit equal to this unit raised by \a power.
 */
UdUnit UdUnit::raisedBy(int power) const
{
    ut_set_status(UT_SUCCESS);
    ut_unit *unit = ut_raise(m_unit, power);
    int status = ut_get_status();
    return UdUnit(unit, status);
}
Пример #2
0
/*
 * Raise a unit-structure to a power.
 */
utUnit*
utRaise(
    const utUnit	*unit,
    int			power,
    utUnit		*result)
{
    return unit == NULL
	? NULL
	: resultingUnit(result, ut_raise(unit->unit2, power));
}