Trees | Indices | Help |
---|
|
SI unit representation, physical quantitiy formatting
SIUnit
object represents a physical SI unit (or
any other unit), it can be created from a unit string with SIUnit.new
().
SIUnit is also responsible for prefixes selection and generally
formatting of physical quantities (see also gwymath for pure number
formatting functions). There are several functions computing value
format (as a SIValueFormat
structure) with given
resolution -- SIUnit.get_format_with_resolution(), or number of
significant digits -- SIUnit.get_format_with_digits().
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
Creates a new SI unit from string representation. Unit string represents unit with no prefixes (e. g. "m", "N", "A", etc.)
|
Sets string that represents unit. It must be base unit with no prefixes (e. g. "m", "N", "A", etc.).
|
Changes an SI unit according to string representation. This is a more powerful version of SIUnit.set_from_string(), please see
|
Obtains string representing a SI unit.
|
Multiplies two SI units.
|
Divides two SI units.
|
Computes a power of an SI unit.
|
Calulates n-th root of an SI unit. This operation fails if the result would have fractional powers that
are not representable by
Since: 2.5 |
Computes the product of two SI units raised to arbitrary powers. This is the most complex SI unit arithmetic function. It can be easily chained when more than two units are to be multiplied.
Since: 2.4 |
Checks whether two SI units are equal.
|
Checks whether an SI unit corresponds to given string. Any power-of-ten prefixes are ignored. This function is mostly useful
for quick commensurability checks with simple units such as "m"
and for checking whether a unit is non-empty (by comparing with
Since: 2.49 |
Finds a good format for representing a value. The values should be then printed as
value/
|
Finds format for representing a specific power-of-10 multiple of a unit. The values should be then printed as
value/ This function does not change the precision field of
|
Finds a good format for representing a range of values with given resolution. The values should be then printed as
value/
|
Finds a good format for representing a values with given number of significant digits. The values should be then printed as
value/
|
Convenience macro doing gwy_serializable_duplicate() with all the necessary typecasting.
|
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 | http://epydoc.sourceforge.net |