|
PER Firmware
|
SI and Imperial unit defs and conversion functions. More...
Go to the source code of this file.
Classes | |
| struct | celsius_t |
| struct | fahrenheit_t |
| struct | meters_t |
| struct | centimeters_t |
| struct | millimeters_t |
| struct | inches_t |
| struct | feet_t |
| struct | miles_t |
| struct | milliseconds_t |
| struct | seconds_t |
| struct | minutes_t |
| struct | hours_t |
| struct | days_t |
| struct | degrees_t |
| struct | radians_t |
| struct | grams_t |
| struct | kilograms_t |
| struct | pounds_t |
| struct | pascals_t |
| struct | psi_t |
| struct | bar_t |
| struct | mps_t |
| struct | kph_t |
| struct | mph_t |
Macros | |
| #define | UNIT_FUNC_MODIFIERS [[nodiscard, gnu::always_inline]] static inline |
| #define | meters_from(x) |
| #define | seconds_from(x) |
| #define | kilograms_from(x) |
Functions | |
| UNIT_FUNC_MODIFIERS fahrenheit_t | fahrenheit_from (celsius_t c) |
| UNIT_FUNC_MODIFIERS celsius_t | celsius_from (fahrenheit_t f) |
| UNIT_FUNC_MODIFIERS meters_t | meters_from_centimeters (centimeters_t cm) |
| UNIT_FUNC_MODIFIERS meters_t | meters_from_millimeters (millimeters_t mm) |
| UNIT_FUNC_MODIFIERS meters_t | meters_from_inches (inches_t in) |
| UNIT_FUNC_MODIFIERS meters_t | meters_from_feet (feet_t ft) |
| UNIT_FUNC_MODIFIERS meters_t | meters_from_miles (miles_t mi) |
| UNIT_FUNC_MODIFIERS seconds_t | seconds_from_milliseconds (milliseconds_t ms) |
| UNIT_FUNC_MODIFIERS seconds_t | seconds_from_minutes (minutes_t min) |
| UNIT_FUNC_MODIFIERS seconds_t | seconds_from_hours (hours_t hr) |
| UNIT_FUNC_MODIFIERS seconds_t | seconds_from_days (days_t d) |
| UNIT_FUNC_MODIFIERS radians_t | radians_from (degrees_t deg) |
| UNIT_FUNC_MODIFIERS degrees_t | degrees_from (radians_t rad) |
| UNIT_FUNC_MODIFIERS kilograms_t | kilograms_from_grams (grams_t g) |
| UNIT_FUNC_MODIFIERS kilograms_t | kilograms_from_pounds (pounds_t lb) |
| UNIT_FUNC_MODIFIERS pascals_t | pascals_from_psi (psi_t p) |
| UNIT_FUNC_MODIFIERS pascals_t | pascals_from_bar (bar_t b) |
| UNIT_FUNC_MODIFIERS psi_t | psi_from_pascals (pascals_t p) |
| UNIT_FUNC_MODIFIERS bar_t | bar_from_pascals (pascals_t p) |
| UNIT_FUNC_MODIFIERS mps_t | mps_from_kph (kph_t k) |
| UNIT_FUNC_MODIFIERS mps_t | mps_from_mph (mph_t m) |
| UNIT_FUNC_MODIFIERS kph_t | kph_from_mps (mps_t m) |
| UNIT_FUNC_MODIFIERS mph_t | mph_from_mps (mps_t m) |
SI and Imperial unit defs and conversion functions.
Provides simple type-safe wrappers around physical unit conversions. All types under the hood are structs containing a single float.
| #define kilograms_from | ( | x | ) |
| #define meters_from | ( | x | ) |
| #define seconds_from | ( | x | ) |