Unit Conversion and Dimensional Analysis Library 3.6.1
A compile-time, header-only C++23 dimensional-analysis library
Loading...
Searching...
No Matches
units::dimension_term Struct Reference

one base-dimension term of a signature: which base dimension (by name-hash), and its rational exponent More...

#include <serialization.h>

Public Attributes

std::uint64_t hash
 FNV-1a hash of the base dimension's name; the wire identity.
std::int64_t num
 exponent numerator
std::int64_t den
 exponent denominator (1 for the common integer-exponent case)

Detailed Description

one base-dimension term of a signature: which base dimension (by name-hash), and its rational exponent

The base dimension is identified by an FNV-1a hash of its name string, so an arbitrary — including user-defined — base dimension round-trips in a fixed 8 bytes with no central registry.


The documentation for this struct was generated from the following file: