Unity
0.3
Parser for unit strings
|
A component of a unit expression. More...
#include <unity.h>
Data Fields | |
int | prefix_power |
The base-10 logarithm of the prefix in front of the unit. | |
struct unit_definition * | 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. | |
float | power |
The power to which the unit is raised. | |
struct unit_struct * | next |
A pointer to the next unit in the sequence. |
A component of a unit expression.
char* base_unit_string |
The base unit of this unit specification.
This might be 'm' for metres, 'Hz' for Hertz, and so on.
float power |
The power to which the unit is raised.
The specification 'mm^(-2)' will result in a power of '-2'.
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.