Unity
0.8
Parser for unit strings
|
A single parsed unit. More...
#include <unity.h>
Data Fields | |
float | power |
The power to which the unit is raised. | |
UnitTypes | type |
Indicates which type of unit this is. | |
struct unit_struct * | next |
A pointer to the next unit in the sequence. | |
SimpleUnit | u |
A contained simple unit. | |
FunctionApplication | f |
A contained function-of unit. | |
A single parsed unit.
This can be either a simple unit (corresponding to, for example, 'MHz') or a function of a sequence of units (corresponding to, for example, 'log(V^2/mHz)').
float power |
The power to which the unit is raised.
The specification 'mm^(-2)' will result in a power of '-2'.
UnitTypes type |
Indicates which type of unit this is.
Depending on the value of this, one or other of the structs 'u' or 'f' will be valid (but not both).