|
Unity 1.0
Parser for unit strings
|
A simple unit, corresponding to, for example, ‘MHz’. More...
#include <unity.h>

Data Fields | |
| char | base10_p |
| True (non-zero) if the prefix is a power of 10; false if it's a power of 2. | |
| const UnitDef * | base_unit_def |
| The base unit of this unit specification, as a known unit. | |
| char * | base_unit_string |
| The base unit of this unit specification. | |
| int | prefix_power |
| The base-10 logarithm of the prefix in front of the unit. | |
A simple unit, corresponding to, for example, ‘MHz’.
| const UnitDef* base_unit_def |
The base unit of this unit specification, as a known unit.
If this is not a known unit (in the syntax which parsed the associated expression) then this will be NULL.
| char* base_unit_string |
The base unit of this unit specification.
This might be ‘m’ for metres, ‘Hz’ for Hertz, and so on.
| int prefix_power |
The base-10 logarithm of the prefix in front of the unit.
For example, this will be ‘-3’ for the ‘m’ (milli-) prefix.
1.7.4