struct te_unit_list
Overview
Customizable unit type More…
#include <te_units.h> struct te_unit_list { // fields unsigned int scale; const double* non_uniform_scale; int start_pow; const char*const* units; };
Detailed Documentation
Customizable unit type
Fields
unsigned int scale
Relative scaling factor of each unit.
If non_uniform_scale is not NULL
, the scale must not be greater than 1
(basically, it is not used in this case)
const double* non_uniform_scale
A set of non-uniform scale factors.
Unlike scale, those are absolute factors applied to a base value
If the field is not NULL
, the array must contain at least as many elements as units.
int start_pow
The initial power of scale
which the first unit in the list corresponds to. If the value is negative, first -start_pow
units denote fractions of the base unit.
The value should be 0 if non_uniform_scale is provided.
const char*const* units
NULL-terminated list of unit names