PER Firmware
Loading...
Searching...
No Matches
dearunits.h File Reference

Auto-generated unit types and conversion functions. More...

Include dependency graph for dearunits.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  meter_t
 
struct  millimeter_t
 
struct  centimeter_t
 
struct  inch_t
 
struct  foot_t
 
struct  mile_t
 
struct  kilometer_t
 
struct  second_t
 
struct  millisecond_t
 
struct  minute_t
 
struct  hour_t
 
struct  day_t
 
struct  kilogram_t
 
struct  gram_t
 
struct  pound_t
 
struct  amp_t
 
struct  milliamp_t
 
struct  celsius_t
 
struct  fahrenheit_t
 
struct  radian_t
 
struct  degree_t
 
struct  revolution_t
 
struct  meters_per_second_t
 
struct  kilometers_per_hour_t
 
struct  miles_per_hour_t
 
struct  meters_per_second_squared_t
 
struct  standard_gravity_t
 
struct  radians_per_second_t
 
struct  degrees_per_second_t
 
struct  revolutions_per_minute_t
 
struct  newton_t
 
struct  pound_force_t
 
struct  newton_meter_t
 
struct  pound_foot_t
 
struct  pascal_t
 
struct  kilopascal_t
 
struct  pound_per_square_inch_t
 
struct  bar_t
 
struct  volt_t
 
struct  millivolt_t
 
struct  square_meter_t
 
struct  square_millimeter_t
 
struct  square_centimeter_t
 
struct  hertz_t
 
struct  kilohertz_t
 
struct  coulomb_t
 
struct  amp_hour_t
 
struct  ohm_t
 
struct  milliohm_t
 
struct  kiloohm_t
 
struct  watt_t
 
struct  kilowatt_t
 
struct  joule_t
 
struct  watt_hour_t
 
struct  kilowatt_hour_t
 

Macros

#define DU_FUNC_MODIFIERS   [[nodiscard, gnu::always_inline]] static inline
 
#define DU_METER_FROM(x)
 
#define DU_SECOND_FROM(x)
 
#define DU_KILOGRAM_FROM(x)
 
#define DU_AMP_FROM(x)
 
#define DU_CELSIUS_FROM(x)
 
#define DU_RADIAN_FROM(x)
 
#define DU_METERS_PER_SECOND_FROM(x)
 
#define DU_METERS_PER_SECOND_SQUARED_FROM(x)
 
#define DU_RADIANS_PER_SECOND_FROM(x)
 
#define DU_NEWTON_FROM(x)
 
#define DU_NEWTON_METER_FROM(x)
 
#define DU_PASCAL_FROM(x)
 
#define DU_VOLT_FROM(x)
 
#define DU_SQUARE_METER_FROM(x)
 
#define DU_HERTZ_FROM(x)
 
#define DU_COULOMB_FROM(x)
 
#define DU_OHM_FROM(x)
 
#define DU_WATT_FROM(x)
 
#define DU_JOULE_FROM(x)
 
#define DU_ADD(a, b)
 
#define DU_SUBTRACT(a, b)
 
#define DU_NEGATE(a)
 
#define DU_ABS(a)
 
#define DU_MIN(a, b)
 
#define DU_MAX(a, b)
 
#define DU_CLAMP(x, lo, hi)
 
#define DU_NEARLY_EQUAL(a, b, tol)
 
#define DU_LT(a, b)
 
#define DU_GT(a, b)
 
#define DU_LE(a, b)
 
#define DU_GE(a, b)
 
#define DU_MULTIPLY(a, b)
 
#define DU_DIVIDE(a, b)
 
#define DU_SQUARE(a)
 
#define DU_SQRT(a)
 

Functions

DU_FUNC_MODIFIERS meter_t meter_from_millimeter (millimeter_t x)
 
DU_FUNC_MODIFIERS millimeter_t millimeter_from_meter (meter_t x)
 
DU_FUNC_MODIFIERS meter_t meter_from_centimeter (centimeter_t x)
 
DU_FUNC_MODIFIERS centimeter_t centimeter_from_meter (meter_t x)
 
DU_FUNC_MODIFIERS meter_t meter_from_inch (inch_t x)
 
DU_FUNC_MODIFIERS inch_t inch_from_meter (meter_t x)
 
DU_FUNC_MODIFIERS meter_t meter_from_foot (foot_t x)
 
DU_FUNC_MODIFIERS foot_t foot_from_meter (meter_t x)
 
DU_FUNC_MODIFIERS meter_t meter_from_mile (mile_t x)
 
DU_FUNC_MODIFIERS mile_t mile_from_meter (meter_t x)
 
DU_FUNC_MODIFIERS meter_t meter_from_kilometer (kilometer_t x)
 
DU_FUNC_MODIFIERS kilometer_t kilometer_from_meter (meter_t x)
 
DU_FUNC_MODIFIERS second_t second_from_millisecond (millisecond_t x)
 
DU_FUNC_MODIFIERS millisecond_t millisecond_from_second (second_t x)
 
DU_FUNC_MODIFIERS second_t second_from_minute (minute_t x)
 
DU_FUNC_MODIFIERS minute_t minute_from_second (second_t x)
 
DU_FUNC_MODIFIERS second_t second_from_hour (hour_t x)
 
DU_FUNC_MODIFIERS hour_t hour_from_second (second_t x)
 
DU_FUNC_MODIFIERS second_t second_from_day (day_t x)
 
DU_FUNC_MODIFIERS day_t day_from_second (second_t x)
 
DU_FUNC_MODIFIERS kilogram_t kilogram_from_gram (gram_t x)
 
DU_FUNC_MODIFIERS gram_t gram_from_kilogram (kilogram_t x)
 
DU_FUNC_MODIFIERS kilogram_t kilogram_from_pound (pound_t x)
 
DU_FUNC_MODIFIERS pound_t pound_from_kilogram (kilogram_t x)
 
DU_FUNC_MODIFIERS amp_t amp_from_milliamp (milliamp_t x)
 
DU_FUNC_MODIFIERS milliamp_t milliamp_from_amp (amp_t x)
 
DU_FUNC_MODIFIERS celsius_t celsius_from_fahrenheit (fahrenheit_t x)
 
DU_FUNC_MODIFIERS fahrenheit_t fahrenheit_from_celsius (celsius_t x)
 
DU_FUNC_MODIFIERS radian_t radian_from_degree (degree_t x)
 
DU_FUNC_MODIFIERS degree_t degree_from_radian (radian_t x)
 
DU_FUNC_MODIFIERS radian_t radian_from_revolution (revolution_t x)
 
DU_FUNC_MODIFIERS revolution_t revolution_from_radian (radian_t x)
 
DU_FUNC_MODIFIERS meters_per_second_t meters_per_second_from_kilometers_per_hour (kilometers_per_hour_t x)
 
DU_FUNC_MODIFIERS kilometers_per_hour_t kilometers_per_hour_from_meters_per_second (meters_per_second_t x)
 
DU_FUNC_MODIFIERS meters_per_second_t meters_per_second_from_miles_per_hour (miles_per_hour_t x)
 
DU_FUNC_MODIFIERS miles_per_hour_t miles_per_hour_from_meters_per_second (meters_per_second_t x)
 
DU_FUNC_MODIFIERS meters_per_second_squared_t meters_per_second_squared_from_standard_gravity (standard_gravity_t x)
 
DU_FUNC_MODIFIERS standard_gravity_t standard_gravity_from_meters_per_second_squared (meters_per_second_squared_t x)
 
DU_FUNC_MODIFIERS radians_per_second_t radians_per_second_from_degrees_per_second (degrees_per_second_t x)
 
DU_FUNC_MODIFIERS degrees_per_second_t degrees_per_second_from_radians_per_second (radians_per_second_t x)
 
DU_FUNC_MODIFIERS radians_per_second_t radians_per_second_from_revolutions_per_minute (revolutions_per_minute_t x)
 
DU_FUNC_MODIFIERS revolutions_per_minute_t revolutions_per_minute_from_radians_per_second (radians_per_second_t x)
 
DU_FUNC_MODIFIERS newton_t newton_from_pound_force (pound_force_t x)
 
DU_FUNC_MODIFIERS pound_force_t pound_force_from_newton (newton_t x)
 
DU_FUNC_MODIFIERS newton_meter_t newton_meter_from_pound_foot (pound_foot_t x)
 
DU_FUNC_MODIFIERS pound_foot_t pound_foot_from_newton_meter (newton_meter_t x)
 
DU_FUNC_MODIFIERS pascal_t pascal_from_kilopascal (kilopascal_t x)
 
DU_FUNC_MODIFIERS kilopascal_t kilopascal_from_pascal (pascal_t x)
 
DU_FUNC_MODIFIERS pascal_t pascal_from_pound_per_square_inch (pound_per_square_inch_t x)
 
DU_FUNC_MODIFIERS pound_per_square_inch_t pound_per_square_inch_from_pascal (pascal_t x)
 
DU_FUNC_MODIFIERS pascal_t pascal_from_bar (bar_t x)
 
DU_FUNC_MODIFIERS bar_t bar_from_pascal (pascal_t x)
 
DU_FUNC_MODIFIERS volt_t volt_from_millivolt (millivolt_t x)
 
DU_FUNC_MODIFIERS millivolt_t millivolt_from_volt (volt_t x)
 
DU_FUNC_MODIFIERS square_meter_t square_meter_from_square_millimeter (square_millimeter_t x)
 
DU_FUNC_MODIFIERS square_millimeter_t square_millimeter_from_square_meter (square_meter_t x)
 
DU_FUNC_MODIFIERS square_meter_t square_meter_from_square_centimeter (square_centimeter_t x)
 
DU_FUNC_MODIFIERS square_centimeter_t square_centimeter_from_square_meter (square_meter_t x)
 
DU_FUNC_MODIFIERS hertz_t hertz_from_kilohertz (kilohertz_t x)
 
DU_FUNC_MODIFIERS kilohertz_t kilohertz_from_hertz (hertz_t x)
 
DU_FUNC_MODIFIERS coulomb_t coulomb_from_amp_hour (amp_hour_t x)
 
DU_FUNC_MODIFIERS amp_hour_t amp_hour_from_coulomb (coulomb_t x)
 
DU_FUNC_MODIFIERS ohm_t ohm_from_milliohm (milliohm_t x)
 
DU_FUNC_MODIFIERS milliohm_t milliohm_from_ohm (ohm_t x)
 
DU_FUNC_MODIFIERS ohm_t ohm_from_kiloohm (kiloohm_t x)
 
DU_FUNC_MODIFIERS kiloohm_t kiloohm_from_ohm (ohm_t x)
 
DU_FUNC_MODIFIERS watt_t watt_from_kilowatt (kilowatt_t x)
 
DU_FUNC_MODIFIERS kilowatt_t kilowatt_from_watt (watt_t x)
 
DU_FUNC_MODIFIERS joule_t joule_from_watt_hour (watt_hour_t x)
 
DU_FUNC_MODIFIERS watt_hour_t watt_hour_from_joule (joule_t x)
 
DU_FUNC_MODIFIERS joule_t joule_from_kilowatt_hour (kilowatt_hour_t x)
 
DU_FUNC_MODIFIERS kilowatt_hour_t kilowatt_hour_from_joule (joule_t x)
 
DU_FUNC_MODIFIERS meters_per_second_t velocity_from (meter_t length, second_t time)
 
DU_FUNC_MODIFIERS meters_per_second_squared_t acceleration_from (meter_t length, second_t time)
 
DU_FUNC_MODIFIERS radians_per_second_t angular_velocity_from (radian_t angle, second_t time)
 
DU_FUNC_MODIFIERS newton_t force_from (kilogram_t mass, meter_t length, second_t time)
 
DU_FUNC_MODIFIERS newton_meter_t torque_from (newton_t force, meter_t length)
 
DU_FUNC_MODIFIERS pascal_t pressure_from (newton_t force, meter_t length)
 
DU_FUNC_MODIFIERS volt_t voltage_from (kilogram_t mass, meter_t length, second_t time, amp_t current)
 
DU_FUNC_MODIFIERS square_meter_t area_from (meter_t length)
 
DU_FUNC_MODIFIERS hertz_t frequency_from (second_t time)
 
DU_FUNC_MODIFIERS coulomb_t charge_from (amp_t current, second_t time)
 
DU_FUNC_MODIFIERS ohm_t resistance_from (volt_t voltage, amp_t current)
 
DU_FUNC_MODIFIERS watt_t power_from (newton_t force, meter_t length, second_t time)
 
DU_FUNC_MODIFIERS joule_t energy_from (watt_t power, second_t time)
 
DU_FUNC_MODIFIERS square_meter_t dearunits_square_meter (meter_t a)
 
DU_FUNC_MODIFIERS meter_t dearunits_sqrt_square_meter (square_meter_t a)
 

Variables

const int dearunits_error_unsupported_operands_use_base_units_or_float
 

Detailed Description

Auto-generated unit types and conversion functions.

Note
This file is auto-generated by DearUnits; do not modify manually.
Author
Danny Proano (dproa.nosp@m.no@p.nosp@m.urdue.nosp@m..edu)

Macro Definition Documentation

◆ DU_ABS

#define DU_ABS ( a)
Value:
_Generic((a), \
meter_t: dearunits_abs_meter, \
second_t: dearunits_abs_second, \
kilogram_t: dearunits_abs_kilogram, \
amp_t: dearunits_abs_amp, \
celsius_t: dearunits_abs_celsius, \
radian_t: dearunits_abs_radian, \
meters_per_second_t: dearunits_abs_meters_per_second, \
meters_per_second_squared_t: dearunits_abs_meters_per_second_squared, \
radians_per_second_t: dearunits_abs_radians_per_second, \
newton_t: dearunits_abs_newton, \
newton_meter_t: dearunits_abs_newton_meter, \
pascal_t: dearunits_abs_pascal, \
volt_t: dearunits_abs_volt, \
square_meter_t: dearunits_abs_square_meter, \
hertz_t: dearunits_abs_hertz, \
coulomb_t: dearunits_abs_coulomb, \
ohm_t: dearunits_abs_ohm, \
watt_t: dearunits_abs_watt, \
joule_t: dearunits_abs_joule \
)(a)
Definition dearunits.h:42
Definition dearunits.h:46
Definition dearunits.h:96
Definition dearunits.h:92
Definition dearunits.h:109
Definition dearunits.h:37
Definition dearunits.h:21
Definition dearunits.h:60
Definition dearunits.h:55
Definition dearunits.h:73
Definition dearunits.h:69
Definition dearunits.h:100
Definition dearunits.h:77
Definition dearunits.h:50
Definition dearunits.h:64
Definition dearunits.h:30
Definition dearunits.h:87
Definition dearunits.h:83
Definition dearunits.h:105

◆ DU_ADD

#define DU_ADD ( a,
b )
Value:
_Generic((a), \
meter_t: dearunits_add_meter, \
second_t: dearunits_add_second, \
kilogram_t: dearunits_add_kilogram, \
amp_t: dearunits_add_amp, \
celsius_t: dearunits_add_celsius, \
radian_t: dearunits_add_radian, \
meters_per_second_t: dearunits_add_meters_per_second, \
meters_per_second_squared_t: dearunits_add_meters_per_second_squared, \
radians_per_second_t: dearunits_add_radians_per_second, \
newton_t: dearunits_add_newton, \
newton_meter_t: dearunits_add_newton_meter, \
pascal_t: dearunits_add_pascal, \
volt_t: dearunits_add_volt, \
square_meter_t: dearunits_add_square_meter, \
hertz_t: dearunits_add_hertz, \
coulomb_t: dearunits_add_coulomb, \
ohm_t: dearunits_add_ohm, \
watt_t: dearunits_add_watt, \
joule_t: dearunits_add_joule \
)(a, b)

◆ DU_AMP_FROM

#define DU_AMP_FROM ( x)
Value:
_Generic((x), \
)(x)
DU_FUNC_MODIFIERS amp_t amp_from_milliamp(milliamp_t x)
Definition dearunits.h:263
Definition dearunits.h:43

◆ DU_CELSIUS_FROM

#define DU_CELSIUS_FROM ( x)
Value:
_Generic((x), \
)(x)
DU_FUNC_MODIFIERS celsius_t celsius_from_fahrenheit(fahrenheit_t x)
Definition dearunits.h:278
Definition dearunits.h:47

◆ DU_CLAMP

#define DU_CLAMP ( x,
lo,
hi )
Value:
_Generic((x), \
meter_t: dearunits_clamp_meter, \
second_t: dearunits_clamp_second, \
kilogram_t: dearunits_clamp_kilogram, \
amp_t: dearunits_clamp_amp, \
celsius_t: dearunits_clamp_celsius, \
radian_t: dearunits_clamp_radian, \
meters_per_second_t: dearunits_clamp_meters_per_second, \
meters_per_second_squared_t: dearunits_clamp_meters_per_second_squared, \
radians_per_second_t: dearunits_clamp_radians_per_second, \
newton_t: dearunits_clamp_newton, \
newton_meter_t: dearunits_clamp_newton_meter, \
pascal_t: dearunits_clamp_pascal, \
volt_t: dearunits_clamp_volt, \
square_meter_t: dearunits_clamp_square_meter, \
hertz_t: dearunits_clamp_hertz, \
coulomb_t: dearunits_clamp_coulomb, \
ohm_t: dearunits_clamp_ohm, \
watt_t: dearunits_clamp_watt, \
joule_t: dearunits_clamp_joule \
)(x, lo, hi)

◆ DU_COULOMB_FROM

#define DU_COULOMB_FROM ( x)
Value:
_Generic((x), \
)(x)
DU_FUNC_MODIFIERS coulomb_t coulomb_from_amp_hour(amp_hour_t x)
Definition dearunits.h:509
Definition dearunits.h:97

◆ DU_DIVIDE

#define DU_DIVIDE ( a,
b )

◆ DU_FUNC_MODIFIERS

#define DU_FUNC_MODIFIERS   [[nodiscard, gnu::always_inline]] static inline

◆ DU_GE

#define DU_GE ( a,
b )
Value:
_Generic((a), \
meter_t: dearunits_ge_meter, \
second_t: dearunits_ge_second, \
kilogram_t: dearunits_ge_kilogram, \
amp_t: dearunits_ge_amp, \
celsius_t: dearunits_ge_celsius, \
radian_t: dearunits_ge_radian, \
meters_per_second_t: dearunits_ge_meters_per_second, \
meters_per_second_squared_t: dearunits_ge_meters_per_second_squared, \
radians_per_second_t: dearunits_ge_radians_per_second, \
newton_t: dearunits_ge_newton, \
newton_meter_t: dearunits_ge_newton_meter, \
pascal_t: dearunits_ge_pascal, \
volt_t: dearunits_ge_volt, \
square_meter_t: dearunits_ge_square_meter, \
hertz_t: dearunits_ge_hertz, \
coulomb_t: dearunits_ge_coulomb, \
ohm_t: dearunits_ge_ohm, \
watt_t: dearunits_ge_watt, \
joule_t: dearunits_ge_joule \
)(a, b)

◆ DU_GT

#define DU_GT ( a,
b )
Value:
_Generic((a), \
meter_t: dearunits_gt_meter, \
second_t: dearunits_gt_second, \
kilogram_t: dearunits_gt_kilogram, \
amp_t: dearunits_gt_amp, \
celsius_t: dearunits_gt_celsius, \
radian_t: dearunits_gt_radian, \
meters_per_second_t: dearunits_gt_meters_per_second, \
meters_per_second_squared_t: dearunits_gt_meters_per_second_squared, \
radians_per_second_t: dearunits_gt_radians_per_second, \
newton_t: dearunits_gt_newton, \
newton_meter_t: dearunits_gt_newton_meter, \
pascal_t: dearunits_gt_pascal, \
volt_t: dearunits_gt_volt, \
square_meter_t: dearunits_gt_square_meter, \
hertz_t: dearunits_gt_hertz, \
coulomb_t: dearunits_gt_coulomb, \
ohm_t: dearunits_gt_ohm, \
watt_t: dearunits_gt_watt, \
joule_t: dearunits_gt_joule \
)(a, b)

◆ DU_HERTZ_FROM

#define DU_HERTZ_FROM ( x)
Value:
_Generic((x), \
)(x)
DU_FUNC_MODIFIERS hertz_t hertz_from_kilohertz(kilohertz_t x)
Definition dearunits.h:494
Definition dearunits.h:93

◆ DU_JOULE_FROM

#define DU_JOULE_FROM ( x)
Value:
_Generic((x), \
)(x)
DU_FUNC_MODIFIERS joule_t joule_from_watt_hour(watt_hour_t x)
Definition dearunits.h:565
DU_FUNC_MODIFIERS joule_t joule_from_kilowatt_hour(kilowatt_hour_t x)
Definition dearunits.h:575
Definition dearunits.h:111
Definition dearunits.h:110

◆ DU_KILOGRAM_FROM

#define DU_KILOGRAM_FROM ( x)
Value:
_Generic((x), \
)(x)
DU_FUNC_MODIFIERS kilogram_t kilogram_from_gram(gram_t x)
Definition dearunits.h:237
DU_FUNC_MODIFIERS kilogram_t kilogram_from_pound(pound_t x)
Definition dearunits.h:247
Definition dearunits.h:38
Definition dearunits.h:39

◆ DU_LE

#define DU_LE ( a,
b )
Value:
_Generic((a), \
meter_t: dearunits_le_meter, \
second_t: dearunits_le_second, \
kilogram_t: dearunits_le_kilogram, \
amp_t: dearunits_le_amp, \
celsius_t: dearunits_le_celsius, \
radian_t: dearunits_le_radian, \
meters_per_second_t: dearunits_le_meters_per_second, \
meters_per_second_squared_t: dearunits_le_meters_per_second_squared, \
radians_per_second_t: dearunits_le_radians_per_second, \
newton_t: dearunits_le_newton, \
newton_meter_t: dearunits_le_newton_meter, \
pascal_t: dearunits_le_pascal, \
volt_t: dearunits_le_volt, \
square_meter_t: dearunits_le_square_meter, \
hertz_t: dearunits_le_hertz, \
coulomb_t: dearunits_le_coulomb, \
ohm_t: dearunits_le_ohm, \
watt_t: dearunits_le_watt, \
joule_t: dearunits_le_joule \
)(a, b)

◆ DU_LT

#define DU_LT ( a,
b )
Value:
_Generic((a), \
meter_t: dearunits_lt_meter, \
second_t: dearunits_lt_second, \
kilogram_t: dearunits_lt_kilogram, \
amp_t: dearunits_lt_amp, \
celsius_t: dearunits_lt_celsius, \
radian_t: dearunits_lt_radian, \
meters_per_second_t: dearunits_lt_meters_per_second, \
meters_per_second_squared_t: dearunits_lt_meters_per_second_squared, \
radians_per_second_t: dearunits_lt_radians_per_second, \
newton_t: dearunits_lt_newton, \
newton_meter_t: dearunits_lt_newton_meter, \
pascal_t: dearunits_lt_pascal, \
volt_t: dearunits_lt_volt, \
square_meter_t: dearunits_lt_square_meter, \
hertz_t: dearunits_lt_hertz, \
coulomb_t: dearunits_lt_coulomb, \
ohm_t: dearunits_lt_ohm, \
watt_t: dearunits_lt_watt, \
joule_t: dearunits_lt_joule \
)(a, b)

◆ DU_MAX

#define DU_MAX ( a,
b )
Value:
_Generic((a), \
meter_t: dearunits_max_meter, \
second_t: dearunits_max_second, \
kilogram_t: dearunits_max_kilogram, \
amp_t: dearunits_max_amp, \
celsius_t: dearunits_max_celsius, \
radian_t: dearunits_max_radian, \
meters_per_second_t: dearunits_max_meters_per_second, \
meters_per_second_squared_t: dearunits_max_meters_per_second_squared, \
radians_per_second_t: dearunits_max_radians_per_second, \
newton_t: dearunits_max_newton, \
newton_meter_t: dearunits_max_newton_meter, \
pascal_t: dearunits_max_pascal, \
volt_t: dearunits_max_volt, \
square_meter_t: dearunits_max_square_meter, \
hertz_t: dearunits_max_hertz, \
coulomb_t: dearunits_max_coulomb, \
ohm_t: dearunits_max_ohm, \
watt_t: dearunits_max_watt, \
joule_t: dearunits_max_joule \
)(a, b)

◆ DU_METER_FROM

#define DU_METER_FROM ( x)
Value:
_Generic((x), \
)(x)
DU_FUNC_MODIFIERS meter_t meter_from_centimeter(centimeter_t x)
Definition dearunits.h:129
DU_FUNC_MODIFIERS meter_t meter_from_inch(inch_t x)
Definition dearunits.h:139
DU_FUNC_MODIFIERS meter_t meter_from_mile(mile_t x)
Definition dearunits.h:159
DU_FUNC_MODIFIERS meter_t meter_from_kilometer(kilometer_t x)
Definition dearunits.h:169
DU_FUNC_MODIFIERS meter_t meter_from_foot(foot_t x)
Definition dearunits.h:149
DU_FUNC_MODIFIERS meter_t meter_from_millimeter(millimeter_t x)
Definition dearunits.h:119
Definition dearunits.h:23
Definition dearunits.h:25
Definition dearunits.h:24
Definition dearunits.h:27
Definition dearunits.h:26
Definition dearunits.h:22

◆ DU_METERS_PER_SECOND_FROM

#define DU_METERS_PER_SECOND_FROM ( x)
Value:
_Generic((x), \
)(x)
DU_FUNC_MODIFIERS meters_per_second_t meters_per_second_from_kilometers_per_hour(kilometers_per_hour_t x)
Definition dearunits.h:319
DU_FUNC_MODIFIERS meters_per_second_t meters_per_second_from_miles_per_hour(miles_per_hour_t x)
Definition dearunits.h:329
Definition dearunits.h:56
Definition dearunits.h:57

◆ DU_METERS_PER_SECOND_SQUARED_FROM

#define DU_METERS_PER_SECOND_SQUARED_FROM ( x)
Value:
_Generic((x), \
)(x)
DU_FUNC_MODIFIERS meters_per_second_squared_t meters_per_second_squared_from_standard_gravity(standard_gravity_t x)
Definition dearunits.h:345
Definition dearunits.h:61

◆ DU_MIN

#define DU_MIN ( a,
b )
Value:
_Generic((a), \
meter_t: dearunits_min_meter, \
second_t: dearunits_min_second, \
kilogram_t: dearunits_min_kilogram, \
amp_t: dearunits_min_amp, \
celsius_t: dearunits_min_celsius, \
radian_t: dearunits_min_radian, \
meters_per_second_t: dearunits_min_meters_per_second, \
meters_per_second_squared_t: dearunits_min_meters_per_second_squared, \
radians_per_second_t: dearunits_min_radians_per_second, \
newton_t: dearunits_min_newton, \
newton_meter_t: dearunits_min_newton_meter, \
pascal_t: dearunits_min_pascal, \
volt_t: dearunits_min_volt, \
square_meter_t: dearunits_min_square_meter, \
hertz_t: dearunits_min_hertz, \
coulomb_t: dearunits_min_coulomb, \
ohm_t: dearunits_min_ohm, \
watt_t: dearunits_min_watt, \
joule_t: dearunits_min_joule \
)(a, b)

◆ DU_MULTIPLY

#define DU_MULTIPLY ( a,
b )

◆ DU_NEARLY_EQUAL

#define DU_NEARLY_EQUAL ( a,
b,
tol )
Value:
_Generic((a), \
meter_t: dearunits_nearly_equal_meter, \
second_t: dearunits_nearly_equal_second, \
kilogram_t: dearunits_nearly_equal_kilogram, \
amp_t: dearunits_nearly_equal_amp, \
celsius_t: dearunits_nearly_equal_celsius, \
radian_t: dearunits_nearly_equal_radian, \
meters_per_second_t: dearunits_nearly_equal_meters_per_second, \
meters_per_second_squared_t: dearunits_nearly_equal_meters_per_second_squared, \
radians_per_second_t: dearunits_nearly_equal_radians_per_second, \
newton_t: dearunits_nearly_equal_newton, \
newton_meter_t: dearunits_nearly_equal_newton_meter, \
pascal_t: dearunits_nearly_equal_pascal, \
volt_t: dearunits_nearly_equal_volt, \
square_meter_t: dearunits_nearly_equal_square_meter, \
hertz_t: dearunits_nearly_equal_hertz, \
coulomb_t: dearunits_nearly_equal_coulomb, \
ohm_t: dearunits_nearly_equal_ohm, \
watt_t: dearunits_nearly_equal_watt, \
joule_t: dearunits_nearly_equal_joule \
)(a, b, tol)

◆ DU_NEGATE

#define DU_NEGATE ( a)
Value:
_Generic((a), \
meter_t: dearunits_negate_meter, \
second_t: dearunits_negate_second, \
kilogram_t: dearunits_negate_kilogram, \
amp_t: dearunits_negate_amp, \
celsius_t: dearunits_negate_celsius, \
radian_t: dearunits_negate_radian, \
meters_per_second_t: dearunits_negate_meters_per_second, \
meters_per_second_squared_t: dearunits_negate_meters_per_second_squared, \
radians_per_second_t: dearunits_negate_radians_per_second, \
newton_t: dearunits_negate_newton, \
newton_meter_t: dearunits_negate_newton_meter, \
pascal_t: dearunits_negate_pascal, \
volt_t: dearunits_negate_volt, \
square_meter_t: dearunits_negate_square_meter, \
hertz_t: dearunits_negate_hertz, \
coulomb_t: dearunits_negate_coulomb, \
ohm_t: dearunits_negate_ohm, \
watt_t: dearunits_negate_watt, \
joule_t: dearunits_negate_joule \
)(a)

◆ DU_NEWTON_FROM

#define DU_NEWTON_FROM ( x)
Value:
_Generic((x), \
)(x)
DU_FUNC_MODIFIERS newton_t newton_from_pound_force(pound_force_t x)
Definition dearunits.h:386
Definition dearunits.h:70

◆ DU_NEWTON_METER_FROM

#define DU_NEWTON_METER_FROM ( x)
Value:
_Generic((x), \
)(x)
DU_FUNC_MODIFIERS newton_meter_t newton_meter_from_pound_foot(pound_foot_t x)
Definition dearunits.h:401
Definition dearunits.h:74

◆ DU_OHM_FROM

#define DU_OHM_FROM ( x)
Value:
_Generic((x), \
)(x)
DU_FUNC_MODIFIERS ohm_t ohm_from_milliohm(milliohm_t x)
Definition dearunits.h:524
DU_FUNC_MODIFIERS ohm_t ohm_from_kiloohm(kiloohm_t x)
Definition dearunits.h:534
Definition dearunits.h:102
Definition dearunits.h:101

◆ DU_PASCAL_FROM

#define DU_PASCAL_FROM ( x)
Value:
_Generic((x), \
)(x)
DU_FUNC_MODIFIERS pascal_t pascal_from_bar(bar_t x)
Definition dearunits.h:436
DU_FUNC_MODIFIERS pascal_t pascal_from_pound_per_square_inch(pound_per_square_inch_t x)
Definition dearunits.h:426
DU_FUNC_MODIFIERS pascal_t pascal_from_kilopascal(kilopascal_t x)
Definition dearunits.h:416
Definition dearunits.h:80
Definition dearunits.h:78
Definition dearunits.h:79

◆ DU_RADIAN_FROM

#define DU_RADIAN_FROM ( x)
Value:
_Generic((x), \
)(x)
DU_FUNC_MODIFIERS radian_t radian_from_degree(degree_t x)
Definition dearunits.h:293
DU_FUNC_MODIFIERS radian_t radian_from_revolution(revolution_t x)
Definition dearunits.h:303
Definition dearunits.h:51
Definition dearunits.h:52

◆ DU_RADIANS_PER_SECOND_FROM

#define DU_RADIANS_PER_SECOND_FROM ( x)
Value:
_Generic((x), \
)(x)
DU_FUNC_MODIFIERS radians_per_second_t radians_per_second_from_degrees_per_second(degrees_per_second_t x)
Definition dearunits.h:360
DU_FUNC_MODIFIERS radians_per_second_t radians_per_second_from_revolutions_per_minute(revolutions_per_minute_t x)
Definition dearunits.h:370
Definition dearunits.h:65
Definition dearunits.h:66

◆ DU_SECOND_FROM

#define DU_SECOND_FROM ( x)
Value:
_Generic((x), \
)(x)
DU_FUNC_MODIFIERS second_t second_from_minute(minute_t x)
Definition dearunits.h:199
DU_FUNC_MODIFIERS second_t second_from_millisecond(millisecond_t x)
Definition dearunits.h:189
DU_FUNC_MODIFIERS second_t second_from_day(day_t x)
Definition dearunits.h:219
DU_FUNC_MODIFIERS second_t second_from_hour(hour_t x)
Definition dearunits.h:209
Definition dearunits.h:34
Definition dearunits.h:33
Definition dearunits.h:31
Definition dearunits.h:32

◆ DU_SQRT

#define DU_SQRT ( a)
Value:
_Generic((a), \
)(a)
DU_FUNC_MODIFIERS meter_t dearunits_sqrt_square_meter(square_meter_t a)
Definition dearunits.h:1725

◆ DU_SQUARE

#define DU_SQUARE ( a)
Value:
_Generic((a), \
)(a)
DU_FUNC_MODIFIERS square_meter_t dearunits_square_meter(meter_t a)
Definition dearunits.h:1720

◆ DU_SQUARE_METER_FROM

#define DU_SQUARE_METER_FROM ( x)
Value:
_Generic((x), \
)(x)
DU_FUNC_MODIFIERS square_meter_t square_meter_from_square_centimeter(square_centimeter_t x)
Definition dearunits.h:478
DU_FUNC_MODIFIERS square_meter_t square_meter_from_square_millimeter(square_millimeter_t x)
Definition dearunits.h:468
Definition dearunits.h:89
Definition dearunits.h:88

◆ DU_SUBTRACT

#define DU_SUBTRACT ( a,
b )
Value:
_Generic((a), \
meter_t: dearunits_subtract_meter, \
second_t: dearunits_subtract_second, \
kilogram_t: dearunits_subtract_kilogram, \
amp_t: dearunits_subtract_amp, \
celsius_t: dearunits_subtract_celsius, \
radian_t: dearunits_subtract_radian, \
meters_per_second_t: dearunits_subtract_meters_per_second, \
meters_per_second_squared_t: dearunits_subtract_meters_per_second_squared, \
radians_per_second_t: dearunits_subtract_radians_per_second, \
newton_t: dearunits_subtract_newton, \
newton_meter_t: dearunits_subtract_newton_meter, \
pascal_t: dearunits_subtract_pascal, \
volt_t: dearunits_subtract_volt, \
square_meter_t: dearunits_subtract_square_meter, \
hertz_t: dearunits_subtract_hertz, \
coulomb_t: dearunits_subtract_coulomb, \
ohm_t: dearunits_subtract_ohm, \
watt_t: dearunits_subtract_watt, \
joule_t: dearunits_subtract_joule \
)(a, b)

◆ DU_VOLT_FROM

#define DU_VOLT_FROM ( x)
Value:
_Generic((x), \
)(x)
DU_FUNC_MODIFIERS volt_t volt_from_millivolt(millivolt_t x)
Definition dearunits.h:453
Definition dearunits.h:84

◆ DU_WATT_FROM

#define DU_WATT_FROM ( x)
Value:
_Generic((x), \
)(x)
DU_FUNC_MODIFIERS watt_t watt_from_kilowatt(kilowatt_t x)
Definition dearunits.h:550
Definition dearunits.h:106

Function Documentation

◆ acceleration_from()

DU_FUNC_MODIFIERS meters_per_second_squared_t acceleration_from ( meter_t length,
second_t time )

◆ amp_from_milliamp()

DU_FUNC_MODIFIERS amp_t amp_from_milliamp ( milliamp_t x)

◆ amp_hour_from_coulomb()

DU_FUNC_MODIFIERS amp_hour_t amp_hour_from_coulomb ( coulomb_t x)

◆ angular_velocity_from()

DU_FUNC_MODIFIERS radians_per_second_t angular_velocity_from ( radian_t angle,
second_t time )

◆ area_from()

◆ bar_from_pascal()

DU_FUNC_MODIFIERS bar_t bar_from_pascal ( pascal_t x)

◆ celsius_from_fahrenheit()

DU_FUNC_MODIFIERS celsius_t celsius_from_fahrenheit ( fahrenheit_t x)

◆ centimeter_from_meter()

DU_FUNC_MODIFIERS centimeter_t centimeter_from_meter ( meter_t x)

◆ charge_from()

DU_FUNC_MODIFIERS coulomb_t charge_from ( amp_t current,
second_t time )

◆ coulomb_from_amp_hour()

DU_FUNC_MODIFIERS coulomb_t coulomb_from_amp_hour ( amp_hour_t x)

◆ day_from_second()

DU_FUNC_MODIFIERS day_t day_from_second ( second_t x)

◆ dearunits_sqrt_square_meter()

DU_FUNC_MODIFIERS meter_t dearunits_sqrt_square_meter ( square_meter_t a)

◆ dearunits_square_meter()

DU_FUNC_MODIFIERS square_meter_t dearunits_square_meter ( meter_t a)

◆ degree_from_radian()

DU_FUNC_MODIFIERS degree_t degree_from_radian ( radian_t x)

◆ degrees_per_second_from_radians_per_second()

DU_FUNC_MODIFIERS degrees_per_second_t degrees_per_second_from_radians_per_second ( radians_per_second_t x)

◆ energy_from()

DU_FUNC_MODIFIERS joule_t energy_from ( watt_t power,
second_t time )

◆ fahrenheit_from_celsius()

DU_FUNC_MODIFIERS fahrenheit_t fahrenheit_from_celsius ( celsius_t x)
Here is the caller graph for this function:

◆ foot_from_meter()

DU_FUNC_MODIFIERS foot_t foot_from_meter ( meter_t x)
Here is the caller graph for this function:

◆ force_from()

DU_FUNC_MODIFIERS newton_t force_from ( kilogram_t mass,
meter_t length,
second_t time )
Here is the caller graph for this function:

◆ frequency_from()

DU_FUNC_MODIFIERS hertz_t frequency_from ( second_t time)

◆ gram_from_kilogram()

DU_FUNC_MODIFIERS gram_t gram_from_kilogram ( kilogram_t x)

◆ hertz_from_kilohertz()

DU_FUNC_MODIFIERS hertz_t hertz_from_kilohertz ( kilohertz_t x)

◆ hour_from_second()

DU_FUNC_MODIFIERS hour_t hour_from_second ( second_t x)

◆ inch_from_meter()

DU_FUNC_MODIFIERS inch_t inch_from_meter ( meter_t x)

◆ joule_from_kilowatt_hour()

DU_FUNC_MODIFIERS joule_t joule_from_kilowatt_hour ( kilowatt_hour_t x)

◆ joule_from_watt_hour()

DU_FUNC_MODIFIERS joule_t joule_from_watt_hour ( watt_hour_t x)

◆ kilogram_from_gram()

DU_FUNC_MODIFIERS kilogram_t kilogram_from_gram ( gram_t x)

◆ kilogram_from_pound()

DU_FUNC_MODIFIERS kilogram_t kilogram_from_pound ( pound_t x)

◆ kilohertz_from_hertz()

DU_FUNC_MODIFIERS kilohertz_t kilohertz_from_hertz ( hertz_t x)

◆ kilometer_from_meter()

DU_FUNC_MODIFIERS kilometer_t kilometer_from_meter ( meter_t x)

◆ kilometers_per_hour_from_meters_per_second()

DU_FUNC_MODIFIERS kilometers_per_hour_t kilometers_per_hour_from_meters_per_second ( meters_per_second_t x)

◆ kiloohm_from_ohm()

DU_FUNC_MODIFIERS kiloohm_t kiloohm_from_ohm ( ohm_t x)

◆ kilopascal_from_pascal()

DU_FUNC_MODIFIERS kilopascal_t kilopascal_from_pascal ( pascal_t x)

◆ kilowatt_from_watt()

DU_FUNC_MODIFIERS kilowatt_t kilowatt_from_watt ( watt_t x)

◆ kilowatt_hour_from_joule()

DU_FUNC_MODIFIERS kilowatt_hour_t kilowatt_hour_from_joule ( joule_t x)

◆ meter_from_centimeter()

DU_FUNC_MODIFIERS meter_t meter_from_centimeter ( centimeter_t x)

◆ meter_from_foot()

DU_FUNC_MODIFIERS meter_t meter_from_foot ( foot_t x)

◆ meter_from_inch()

DU_FUNC_MODIFIERS meter_t meter_from_inch ( inch_t x)

◆ meter_from_kilometer()

DU_FUNC_MODIFIERS meter_t meter_from_kilometer ( kilometer_t x)

◆ meter_from_mile()

DU_FUNC_MODIFIERS meter_t meter_from_mile ( mile_t x)

◆ meter_from_millimeter()

DU_FUNC_MODIFIERS meter_t meter_from_millimeter ( millimeter_t x)

◆ meters_per_second_from_kilometers_per_hour()

DU_FUNC_MODIFIERS meters_per_second_t meters_per_second_from_kilometers_per_hour ( kilometers_per_hour_t x)

◆ meters_per_second_from_miles_per_hour()

DU_FUNC_MODIFIERS meters_per_second_t meters_per_second_from_miles_per_hour ( miles_per_hour_t x)

◆ meters_per_second_squared_from_standard_gravity()

DU_FUNC_MODIFIERS meters_per_second_squared_t meters_per_second_squared_from_standard_gravity ( standard_gravity_t x)

◆ mile_from_meter()

DU_FUNC_MODIFIERS mile_t mile_from_meter ( meter_t x)

◆ miles_per_hour_from_meters_per_second()

DU_FUNC_MODIFIERS miles_per_hour_t miles_per_hour_from_meters_per_second ( meters_per_second_t x)
Here is the caller graph for this function:

◆ milliamp_from_amp()

DU_FUNC_MODIFIERS milliamp_t milliamp_from_amp ( amp_t x)

◆ millimeter_from_meter()

DU_FUNC_MODIFIERS millimeter_t millimeter_from_meter ( meter_t x)

◆ milliohm_from_ohm()

DU_FUNC_MODIFIERS milliohm_t milliohm_from_ohm ( ohm_t x)

◆ millisecond_from_second()

DU_FUNC_MODIFIERS millisecond_t millisecond_from_second ( second_t x)

◆ millivolt_from_volt()

DU_FUNC_MODIFIERS millivolt_t millivolt_from_volt ( volt_t x)

◆ minute_from_second()

DU_FUNC_MODIFIERS minute_t minute_from_second ( second_t x)

◆ newton_from_pound_force()

DU_FUNC_MODIFIERS newton_t newton_from_pound_force ( pound_force_t x)

◆ newton_meter_from_pound_foot()

DU_FUNC_MODIFIERS newton_meter_t newton_meter_from_pound_foot ( pound_foot_t x)

◆ ohm_from_kiloohm()

DU_FUNC_MODIFIERS ohm_t ohm_from_kiloohm ( kiloohm_t x)

◆ ohm_from_milliohm()

DU_FUNC_MODIFIERS ohm_t ohm_from_milliohm ( milliohm_t x)

◆ pascal_from_bar()

DU_FUNC_MODIFIERS pascal_t pascal_from_bar ( bar_t x)

◆ pascal_from_kilopascal()

DU_FUNC_MODIFIERS pascal_t pascal_from_kilopascal ( kilopascal_t x)

◆ pascal_from_pound_per_square_inch()

DU_FUNC_MODIFIERS pascal_t pascal_from_pound_per_square_inch ( pound_per_square_inch_t x)

◆ pound_foot_from_newton_meter()

DU_FUNC_MODIFIERS pound_foot_t pound_foot_from_newton_meter ( newton_meter_t x)

◆ pound_force_from_newton()

DU_FUNC_MODIFIERS pound_force_t pound_force_from_newton ( newton_t x)

◆ pound_from_kilogram()

DU_FUNC_MODIFIERS pound_t pound_from_kilogram ( kilogram_t x)

◆ pound_per_square_inch_from_pascal()

DU_FUNC_MODIFIERS pound_per_square_inch_t pound_per_square_inch_from_pascal ( pascal_t x)

◆ power_from()

DU_FUNC_MODIFIERS watt_t power_from ( newton_t force,
meter_t length,
second_t time )

◆ pressure_from()

DU_FUNC_MODIFIERS pascal_t pressure_from ( newton_t force,
meter_t length )

◆ radian_from_degree()

DU_FUNC_MODIFIERS radian_t radian_from_degree ( degree_t x)

◆ radian_from_revolution()

DU_FUNC_MODIFIERS radian_t radian_from_revolution ( revolution_t x)

◆ radians_per_second_from_degrees_per_second()

DU_FUNC_MODIFIERS radians_per_second_t radians_per_second_from_degrees_per_second ( degrees_per_second_t x)

◆ radians_per_second_from_revolutions_per_minute()

DU_FUNC_MODIFIERS radians_per_second_t radians_per_second_from_revolutions_per_minute ( revolutions_per_minute_t x)

◆ resistance_from()

DU_FUNC_MODIFIERS ohm_t resistance_from ( volt_t voltage,
amp_t current )

◆ revolution_from_radian()

DU_FUNC_MODIFIERS revolution_t revolution_from_radian ( radian_t x)

◆ revolutions_per_minute_from_radians_per_second()

DU_FUNC_MODIFIERS revolutions_per_minute_t revolutions_per_minute_from_radians_per_second ( radians_per_second_t x)

◆ second_from_day()

DU_FUNC_MODIFIERS second_t second_from_day ( day_t x)

◆ second_from_hour()

DU_FUNC_MODIFIERS second_t second_from_hour ( hour_t x)

◆ second_from_millisecond()

DU_FUNC_MODIFIERS second_t second_from_millisecond ( millisecond_t x)

◆ second_from_minute()

DU_FUNC_MODIFIERS second_t second_from_minute ( minute_t x)

◆ square_centimeter_from_square_meter()

DU_FUNC_MODIFIERS square_centimeter_t square_centimeter_from_square_meter ( square_meter_t x)

◆ square_meter_from_square_centimeter()

DU_FUNC_MODIFIERS square_meter_t square_meter_from_square_centimeter ( square_centimeter_t x)

◆ square_meter_from_square_millimeter()

DU_FUNC_MODIFIERS square_meter_t square_meter_from_square_millimeter ( square_millimeter_t x)

◆ square_millimeter_from_square_meter()

DU_FUNC_MODIFIERS square_millimeter_t square_millimeter_from_square_meter ( square_meter_t x)

◆ standard_gravity_from_meters_per_second_squared()

DU_FUNC_MODIFIERS standard_gravity_t standard_gravity_from_meters_per_second_squared ( meters_per_second_squared_t x)

◆ torque_from()

DU_FUNC_MODIFIERS newton_meter_t torque_from ( newton_t force,
meter_t length )

◆ velocity_from()

DU_FUNC_MODIFIERS meters_per_second_t velocity_from ( meter_t length,
second_t time )

◆ volt_from_millivolt()

DU_FUNC_MODIFIERS volt_t volt_from_millivolt ( millivolt_t x)

◆ voltage_from()

DU_FUNC_MODIFIERS volt_t voltage_from ( kilogram_t mass,
meter_t length,
second_t time,
amp_t current )

◆ watt_from_kilowatt()

DU_FUNC_MODIFIERS watt_t watt_from_kilowatt ( kilowatt_t x)

◆ watt_hour_from_joule()

DU_FUNC_MODIFIERS watt_hour_t watt_hour_from_joule ( joule_t x)

Variable Documentation

◆ dearunits_error_unsupported_operands_use_base_units_or_float

const int dearunits_error_unsupported_operands_use_base_units_or_float
extern