Unity  0.3
Parser for unit strings
Data Fields
unit_struct Struct Reference

A component of a unit expression. More...

#include <unity.h>

Collaboration diagram for unit_struct:
Collaboration graph
[legend]

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_structnext
 A pointer to the next unit in the sequence.

Detailed Description

A component of a unit expression.


Field Documentation

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'.

The base-10 logarithm of the prefix in front of the unit.

For example, this will be '-3' for the 'm' (milli-) prefix.


The documentation for this struct was generated from the following file:
 All Data Structures Files Functions Variables Typedefs Defines