Constants 1.0
Constants related to math, environment, unit ocnversion macros.
Loading...
Searching...
No Matches
constants_units.h File Reference

Unit conversion macros and SI/binary prefixes. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ARCMINUT_2_ARCSECOND(x)
#define ARCMINUT_2_DEG(x)
#define ARCSECOND_2_ARCMINUT(x)
#define ARCSECOND_2_DEG(x)
#define ATTO   1e-18
#define C_2_F(x)
 Temperature conversion macros.
#define C_2_K(x)
#define C_2_R(x)
#define CENTI   1e-2
#define DAYS_2_HR(x)
#define DAYS_2_MIN(x)
#define DAYS_2_SEC(x)
#define DECI   1e-1
#define DEG_2_ARCMINUT(x)
#define DEG_2_ARCSECOND(x)
#define DEG_2_RAD(x)
#define DEGPS_2_RADPS(x)
#define DEGPS_2_RPM(x)
#define DEKA   1e1
#define EXA   1e18
#define EXBI   (1 << 60)
#define F_2_C(x)
#define F_2_K(x)
#define F_2_R(x)
#define FATHOM_2_M(x)
#define FATHOM_2_YARD(x)
#define FEMTO   1e-15
#define FT_2_IN(x)
#define FT_2_M(x)
#define FT_2_YARD(x)
#define GIBI   (1 << 30)
#define GIGA   1e9
#define HECTO   1e2
#define HR_2_MIN(x)
#define HR_2_SEC(x)
#define HZ_2_MS(x)
#define HZ_2_NS(x)
#define HZ_2_SEC(x)
 Frequency and period conversion macros.
#define HZ_2_US(x)
#define IN_2_CM(x)
#define IN_2_M(x)
#define K_2_C(x)
#define K_2_F(x)
#define K_2_R(x)
#define KG_2_LB(x)
#define KG_2_OUNCE(x)
#define KIBI   (1 << 10)
 IEC binary prefixes.
#define KILO   1e3
#define LB_2_KG(x)
#define LB_2_OUNCE(x)
#define LEAGUE_2_M(x)
#define LEAGUE_2_MILE(x)
#define M_2_FT(x)
#define M_2_IN(x)
#define M_2_MILE(x)
#define MEBI   (1 << 20)
#define MEGA   1e6
#define MICRO   1e-6
#define MIL_2_INCH(x)
#define MILE_2_FEET(x)
#define MILE_2_M(x)
#define MILE_2_YARD(x)
#define MILLI   1e-3
#define MIN_2_SEC(x)
#define MS_2_HZ(x)
#define MS_2_SEC(x)
#define NANO   1e-9
#define NAUT_MILE_2_M(x)
#define NS_2_HZ(x)
#define NS_2_SEC(x)
#define OUNCE_2_KG(x)
#define OUNCE_2_LB(x)
#define PEBI   (1 << 50)
#define PETA   1e15
#define PICO   1e-12
#define QUECTO   1e-30
#define QUETTA   1e30
 SI decimal prefixes.
#define R_2_C(x)
#define R_2_F(x)
#define R_2_K(x)
#define RAD_2_DEG(x)
 Angle conversion macros.
#define RADPS_2_DEGPS(x)
#define RADPS_2_RPM(x)
#define RONNA   1e27
#define RONTO   1e-27
#define RPM_2_DEGPS(x)
#define RPM_2_RADPS(x)
 Rotational speed conversion macros.
#define SEC_2_HZ(x)
#define SEC_2_MS(x)
#define SEC_2_NS(x)
 Time conversion macros.
#define SEC_2_US(x)
#define TEBI   (1 << 40)
#define TERA   1e12
#define THOUGH_2_INCH(x)
 Length conversion macros.
#define TN_2_KG(x)
 Mass conversion macros.
#define US_2_HZ(x)
#define US_2_SEC(x)
#define YARD_2_FT(x)
#define YARD_2_M(x)
#define YOBI   (1 << 80)
#define YOCTO   1e-24
#define YOTTA   1e24
#define ZEBI   (1 << 70)
#define ZEPTO   1e-21
#define ZETTA   1e21

Detailed Description

Unit conversion macros and SI/binary prefixes.

Definition in file constants_units.h.

Macro Definition Documentation

◆ ARCMINUT_2_ARCSECOND

#define ARCMINUT_2_ARCSECOND ( x)
Value:
(x * 60.0)

Definition at line 83 of file constants_units.h.

◆ ARCMINUT_2_DEG

#define ARCMINUT_2_DEG ( x)
Value:
(x / 60.0)

Definition at line 84 of file constants_units.h.

◆ ARCSECOND_2_ARCMINUT

#define ARCSECOND_2_ARCMINUT ( x)
Value:
(x / 60.0)

Definition at line 85 of file constants_units.h.

◆ ARCSECOND_2_DEG

#define ARCSECOND_2_DEG ( x)
Value:
(x / 3600.0)

Definition at line 86 of file constants_units.h.

◆ ATTO

#define ATTO   1e-18

Definition at line 116 of file constants_units.h.

◆ C_2_F

#define C_2_F ( x)
Value:
(1.8 * x + 32.0)

Temperature conversion macros.

Definition at line 65 of file constants_units.h.

◆ C_2_K

#define C_2_K ( x)
Value:
(x + 273.15)

Definition at line 66 of file constants_units.h.

◆ C_2_R

#define C_2_R ( x)
Value:
(0.8 * x)

Definition at line 67 of file constants_units.h.

◆ CENTI

#define CENTI   1e-2

Definition at line 110 of file constants_units.h.

◆ DAYS_2_HR

#define DAYS_2_HR ( x)
Value:
(x * 24.0)

Definition at line 50 of file constants_units.h.

◆ DAYS_2_MIN

#define DAYS_2_MIN ( x)
Value:
(x * 1440.0)

Definition at line 51 of file constants_units.h.

◆ DAYS_2_SEC

#define DAYS_2_SEC ( x)
Value:
(x * 86400.0)

Definition at line 52 of file constants_units.h.

◆ DECI

#define DECI   1e-1

Definition at line 109 of file constants_units.h.

◆ DEG_2_ARCMINUT

#define DEG_2_ARCMINUT ( x)
Value:
(x * 60.0)

Definition at line 81 of file constants_units.h.

◆ DEG_2_ARCSECOND

#define DEG_2_ARCSECOND ( x)
Value:
(x * 3600.0)

Definition at line 82 of file constants_units.h.

◆ DEG_2_RAD

#define DEG_2_RAD ( x)
Value:
(x * 0.017453292519943295769236907684886127)

Definition at line 80 of file constants_units.h.

◆ DEGPS_2_RADPS

#define DEGPS_2_RADPS ( x)
Value:
(x * 0.017453292519943295769236907684886127)

Definition at line 94 of file constants_units.h.

◆ DEGPS_2_RPM

#define DEGPS_2_RPM ( x)
Value:
(x * 0.16666666666666666666666666666667)

Definition at line 93 of file constants_units.h.

◆ DEKA

#define DEKA   1e1

Definition at line 108 of file constants_units.h.

◆ EXA

#define EXA   1e18

Definition at line 101 of file constants_units.h.

◆ EXBI

#define EXBI   (1 << 60)

Definition at line 128 of file constants_units.h.

◆ F_2_C

#define F_2_C ( x)
Value:
((x - 32.0) / 1.8)

Definition at line 68 of file constants_units.h.

◆ F_2_K

#define F_2_K ( x)
Value:
((x - 32.0) / 1.8 + 273.15)

Definition at line 69 of file constants_units.h.

◆ F_2_R

#define F_2_R ( x)
Value:
((x - 32.0) / 2.25)

Definition at line 70 of file constants_units.h.

◆ FATHOM_2_M

#define FATHOM_2_M ( x)
Value:
(x * 1.8288)

Definition at line 28 of file constants_units.h.

◆ FATHOM_2_YARD

#define FATHOM_2_YARD ( x)
Value:
(x * 2.0)

Definition at line 27 of file constants_units.h.

◆ FEMTO

#define FEMTO   1e-15

Definition at line 115 of file constants_units.h.

◆ FT_2_IN

#define FT_2_IN ( x)
Value:
(x * 12.0)

Definition at line 15 of file constants_units.h.

◆ FT_2_M

#define FT_2_M ( x)
Value:
(x * 0.3048)

Definition at line 16 of file constants_units.h.

◆ FT_2_YARD

#define FT_2_YARD ( x)
Value:
(x / 3.0)

Definition at line 20 of file constants_units.h.

◆ GIBI

#define GIBI   (1 << 30)

Definition at line 125 of file constants_units.h.

◆ GIGA

#define GIGA   1e9

Definition at line 104 of file constants_units.h.

◆ HECTO

#define HECTO   1e2

Definition at line 107 of file constants_units.h.

◆ HR_2_MIN

#define HR_2_MIN ( x)
Value:
(x * 60.0)

Definition at line 49 of file constants_units.h.

◆ HR_2_SEC

#define HR_2_SEC ( x)
Value:
(x * 3600.0)

Definition at line 48 of file constants_units.h.

◆ HZ_2_MS

#define HZ_2_MS ( x)
Value:
(1000.0 / x)

Definition at line 56 of file constants_units.h.

◆ HZ_2_NS

#define HZ_2_NS ( x)
Value:
(1000000000.0 / x)

Definition at line 58 of file constants_units.h.

◆ HZ_2_SEC

#define HZ_2_SEC ( x)
Value:
(1.0 / x)

Frequency and period conversion macros.

Definition at line 55 of file constants_units.h.

◆ HZ_2_US

#define HZ_2_US ( x)
Value:
(1000000.0 / x)

Definition at line 57 of file constants_units.h.

◆ IN_2_CM

#define IN_2_CM ( x)
Value:
(x * 2.54)

Definition at line 12 of file constants_units.h.

◆ IN_2_M

#define IN_2_M ( x)
Value:
(x * 0.0254)

Definition at line 13 of file constants_units.h.

◆ K_2_C

#define K_2_C ( x)
Value:
(x - 273.15)

Definition at line 71 of file constants_units.h.

◆ K_2_F

#define K_2_F ( x)
Value:
(1.8 * x - 459.67)

Definition at line 72 of file constants_units.h.

◆ K_2_R

#define K_2_R ( x)
Value:
(0.8 * x - 218.52)

Definition at line 73 of file constants_units.h.

◆ KG_2_LB

#define KG_2_LB ( x)
Value:
(x / 0.45359237)

Definition at line 34 of file constants_units.h.

◆ KG_2_OUNCE

#define KG_2_OUNCE ( x)
Value:
(x * 35.273961949580412915675808215204)

Definition at line 38 of file constants_units.h.

◆ KIBI

#define KIBI   (1 << 10)

IEC binary prefixes.

Definition at line 123 of file constants_units.h.

◆ KILO

#define KILO   1e3

Definition at line 106 of file constants_units.h.

◆ LB_2_KG

#define LB_2_KG ( x)
Value:
(x * 0.45359237)

Definition at line 33 of file constants_units.h.

◆ LB_2_OUNCE

#define LB_2_OUNCE ( x)
Value:
(x * 0.0625)

Definition at line 35 of file constants_units.h.

◆ LEAGUE_2_M

#define LEAGUE_2_M ( x)
Value:
(x * 4800.0)

Definition at line 26 of file constants_units.h.

◆ LEAGUE_2_MILE

#define LEAGUE_2_MILE ( x)
Value:
(x * 3.0)

Definition at line 25 of file constants_units.h.

◆ M_2_FT

#define M_2_FT ( x)
Value:
(x * 3.2808398950131233595800524934383202)

Definition at line 17 of file constants_units.h.

◆ M_2_IN

#define M_2_IN ( x)
Value:
(x * 39.370078740157480314960629921259843)

Definition at line 14 of file constants_units.h.

◆ M_2_MILE

#define M_2_MILE ( x)
Value:
(x / 1609.344)

Definition at line 24 of file constants_units.h.

◆ MEBI

#define MEBI   (1 << 20)

Definition at line 124 of file constants_units.h.

◆ MEGA

#define MEGA   1e6

Definition at line 105 of file constants_units.h.

◆ MICRO

#define MICRO   1e-6

Definition at line 112 of file constants_units.h.

◆ MIL_2_INCH

#define MIL_2_INCH ( x)
Value:
(x * 0.001)

Definition at line 11 of file constants_units.h.

◆ MILE_2_FEET

#define MILE_2_FEET ( x)
Value:
(x * 5280)

Definition at line 21 of file constants_units.h.

◆ MILE_2_M

#define MILE_2_M ( x)
Value:
(x * 1609.344)

Definition at line 23 of file constants_units.h.

◆ MILE_2_YARD

#define MILE_2_YARD ( x)
Value:
(x * 1760)

Definition at line 22 of file constants_units.h.

◆ MILLI

#define MILLI   1e-3

Definition at line 111 of file constants_units.h.

◆ MIN_2_SEC

#define MIN_2_SEC ( x)
Value:
(x * 60.0)

Definition at line 47 of file constants_units.h.

◆ MS_2_HZ

#define MS_2_HZ ( x)
Value:
(1000.0 / x)

Definition at line 60 of file constants_units.h.

◆ MS_2_SEC

#define MS_2_SEC ( x)
Value:
(x * 0.001)

Definition at line 44 of file constants_units.h.

◆ NANO

#define NANO   1e-9

Definition at line 113 of file constants_units.h.

◆ NAUT_MILE_2_M

#define NAUT_MILE_2_M ( x)
Value:
(x * 1852.0)

Definition at line 29 of file constants_units.h.

◆ NS_2_HZ

#define NS_2_HZ ( x)
Value:
(1000000000.0 / x)

Definition at line 62 of file constants_units.h.

◆ NS_2_SEC

#define NS_2_SEC ( x)
Value:
(x * 0.000000001)

Definition at line 46 of file constants_units.h.

◆ OUNCE_2_KG

#define OUNCE_2_KG ( x)
Value:
(x * 0.028349523125)

Definition at line 37 of file constants_units.h.

◆ OUNCE_2_LB

#define OUNCE_2_LB ( x)
Value:
(x * 16.0)

Definition at line 36 of file constants_units.h.

◆ PEBI

#define PEBI   (1 << 50)

Definition at line 127 of file constants_units.h.

◆ PETA

#define PETA   1e15

Definition at line 102 of file constants_units.h.

◆ PICO

#define PICO   1e-12

Definition at line 114 of file constants_units.h.

◆ QUECTO

#define QUECTO   1e-30

Definition at line 120 of file constants_units.h.

◆ QUETTA

#define QUETTA   1e30

SI decimal prefixes.

Definition at line 97 of file constants_units.h.

◆ R_2_C

#define R_2_C ( x)
Value:
(1.25 * x)

Definition at line 74 of file constants_units.h.

◆ R_2_F

#define R_2_F ( x)
Value:
(2.25 * x + 32.0)

Definition at line 75 of file constants_units.h.

◆ R_2_K

#define R_2_K ( x)
Value:
(1.25 * x + 273.15)

Definition at line 76 of file constants_units.h.

◆ RAD_2_DEG

#define RAD_2_DEG ( x)
Value:
(x * 57.295779513082322864647721871733665)

Angle conversion macros.

Definition at line 79 of file constants_units.h.

◆ RADPS_2_DEGPS

#define RADPS_2_DEGPS ( x)
Value:
(x * 57.295779513082322864647721871733665)

Definition at line 92 of file constants_units.h.

◆ RADPS_2_RPM

#define RADPS_2_RPM ( x)
Value:
(x * 9.5492965855137201461330258023509)

Definition at line 91 of file constants_units.h.

◆ RONNA

#define RONNA   1e27

Definition at line 98 of file constants_units.h.

◆ RONTO

#define RONTO   1e-27

Definition at line 119 of file constants_units.h.

◆ RPM_2_DEGPS

#define RPM_2_DEGPS ( x)
Value:
(x * 6.0)

Definition at line 90 of file constants_units.h.

◆ RPM_2_RADPS

#define RPM_2_RADPS ( x)
Value:
(x * 0.10471975511965977461542144610932)

Rotational speed conversion macros.

Definition at line 89 of file constants_units.h.

◆ SEC_2_HZ

#define SEC_2_HZ ( x)
Value:
(1.0 / x)

Definition at line 59 of file constants_units.h.

◆ SEC_2_MS

#define SEC_2_MS ( x)
Value:
(x * 1000.0)

Definition at line 43 of file constants_units.h.

◆ SEC_2_NS

#define SEC_2_NS ( x)
Value:
(x * 1000000000.0)

Time conversion macros.

Definition at line 41 of file constants_units.h.

◆ SEC_2_US

#define SEC_2_US ( x)
Value:
(x * 1000000.0)

Definition at line 42 of file constants_units.h.

◆ TEBI

#define TEBI   (1 << 40)

Definition at line 126 of file constants_units.h.

◆ TERA

#define TERA   1e12

Definition at line 103 of file constants_units.h.

◆ THOUGH_2_INCH

#define THOUGH_2_INCH ( x)
Value:
(x * 0.001)

Length conversion macros.

Definition at line 10 of file constants_units.h.

◆ TN_2_KG

#define TN_2_KG ( x)
Value:
(x * 1000.0)

Mass conversion macros.

Definition at line 32 of file constants_units.h.

◆ US_2_HZ

#define US_2_HZ ( x)
Value:
(1000000.0 / x)

Definition at line 61 of file constants_units.h.

◆ US_2_SEC

#define US_2_SEC ( x)
Value:
(x * 0.000001)

Definition at line 45 of file constants_units.h.

◆ YARD_2_FT

#define YARD_2_FT ( x)
Value:
(x * 3.0)

Definition at line 18 of file constants_units.h.

◆ YARD_2_M

#define YARD_2_M ( x)
Value:
(x * 0.9144)

Definition at line 19 of file constants_units.h.

◆ YOBI

#define YOBI   (1 << 80)

Definition at line 130 of file constants_units.h.

◆ YOCTO

#define YOCTO   1e-24

Definition at line 118 of file constants_units.h.

◆ YOTTA

#define YOTTA   1e24

Definition at line 99 of file constants_units.h.

◆ ZEBI

#define ZEBI   (1 << 70)

Definition at line 129 of file constants_units.h.

◆ ZEPTO

#define ZEPTO   1e-21

Definition at line 117 of file constants_units.h.

◆ ZETTA

#define ZETTA   1e21

Definition at line 100 of file constants_units.h.