← Back

Module constants

const PI: f64

Archimedes' constant (π)

Source: constants.joule:9

const TAU: f64

2π (full circle in radians)

Source: constants.joule:12

const FRAC_PI_2: f64

π/2 (quarter turn)

Source: constants.joule:15

const FRAC_PI_3: f64

π/3

Source: constants.joule:18

const FRAC_PI_4: f64

π/4 (eighth turn)

Source: constants.joule:21

const FRAC_PI_6: f64

π/6

Source: constants.joule:24

const FRAC_PI_8: f64

π/8

Source: constants.joule:27

const FRAC_1_PI: f64

1/π

Source: constants.joule:30

const FRAC_2_PI: f64

2/π

Source: constants.joule:33

const FRAC_2_SQRT_PI: f64

2/√π

Source: constants.joule:36

const E: f64

Euler's number (e)

Source: constants.joule:43

const FRAC_1_E: f64

1/e

Source: constants.joule:46

const LN_2: f64

ln(2)

Source: constants.joule:49

const LN_10: f64

ln(10)

Source: constants.joule:52

const LOG2_E: f64

log₂(e)

Source: constants.joule:55

const LOG2_10: f64

log₂(10)

Source: constants.joule:58

const LOG10_E: f64

log₁₀(e)

Source: constants.joule:61

const LOG10_2: f64

log₁₀(2)

Source: constants.joule:64

const SQRT_2: f64

√2

Source: constants.joule:71

const SQRT_3: f64

√3

Source: constants.joule:74

const SQRT_5: f64

√5

Source: constants.joule:77

const FRAC_1_SQRT_2: f64

1/√2 = √2/2

Source: constants.joule:80

const FRAC_1_SQRT_3: f64

1/√3 = √3/3

Source: constants.joule:83

const PHI: f64

Golden ratio (φ) = (1 + √5) / 2

Source: constants.joule:90

const FRAC_1_PHI: f64

1/φ = φ - 1

Source: constants.joule:93

const EULER_GAMMA: f64

Euler-Mascheroni constant (γ)

Source: constants.joule:100

const CATALAN: f64

Catalan's constant (G)

Source: constants.joule:103

const APERY: f64

Apéry's constant (ζ(3))

Source: constants.joule:106

const KHINCHIN: f64

Khinchin's constant

Source: constants.joule:109

const GLAISHER: f64

Glaisher-Kinkelin constant

Source: constants.joule:112

const SPEED_OF_LIGHT: f64

Speed of light in vacuum (m/s)

Source: constants.joule:119

const PLANCK: f64

Planck's constant (J·s)

Source: constants.joule:122

const HBAR: f64

Reduced Planck's constant ℏ = h/(2π) (J·s)

Source: constants.joule:125

const ELEMENTARY_CHARGE: f64

Elementary charge (C)

Source: constants.joule:128

const BOLTZMANN: f64

Boltzmann constant (J/K)

Source: constants.joule:131

const AVOGADRO: f64

Avogadro constant (1/mol)

Source: constants.joule:134

const GAS_CONSTANT: f64

Gas constant (J/(mol·K))

Source: constants.joule:137

const GRAVITATIONAL: f64

Gravitational constant (m³/(kg·s²))

Source: constants.joule:140

const STANDARD_GRAVITY: f64

Standard gravity (m/s²)

Source: constants.joule:143

const STEFAN_BOLTZMANN: f64

Stefan-Boltzmann constant (W/(m²·K⁴))

Source: constants.joule:146

const ELECTRON_MASS: f64

Electron mass (kg)

Source: constants.joule:149

const PROTON_MASS: f64

Proton mass (kg)

Source: constants.joule:152

const NEUTRON_MASS: f64

Neutron mass (kg)

Source: constants.joule:155

const ATOMIC_MASS_UNIT: f64

Atomic mass unit (kg)

Source: constants.joule:158

const VACUUM_PERMITTIVITY: f64

Vacuum permittivity ε₀ (F/m)

Source: constants.joule:161

const VACUUM_PERMEABILITY: f64

Vacuum permeability μ₀ (H/m)

Source: constants.joule:164

const FINE_STRUCTURE: f64

Fine structure constant α

Source: constants.joule:167

const RYDBERG: f64

Rydberg constant (1/m)

Source: constants.joule:170

const BOHR_RADIUS: f64

Bohr radius (m)

Source: constants.joule:173

const ELECTRON_VOLT: f64

Electron volt (J)

Source: constants.joule:176

const DEG_TO_RAD: f64

Degrees to radians

Source: constants.joule:183

const RAD_TO_DEG: f64

Radians to degrees

Source: constants.joule:186

const KM_TO_MI: f64

Kilometers to miles

Source: constants.joule:189

const MI_TO_KM: f64

Miles to kilometers

Source: constants.joule:192

const LB_TO_KG: f64

Pounds to kilograms

Source: constants.joule:195

const KG_TO_LB: f64

Kilograms to pounds

Source: constants.joule:198

const CELSIUS_OFFSET: f64

Celsius to Fahrenheit offset

Source: constants.joule:201

const FAHRENHEIT_SCALE: f64

Fahrenheit to Celsius scale

Source: constants.joule:204

const PI_F32: f32

Source: constants.joule:210

const TAU_F32: f32

Source: constants.joule:211

const E_F32: f32

Source: constants.joule:212

const SQRT_2_F32: f32

Source: constants.joule:213

const LN_2_F32: f32

Source: constants.joule:214

const LN_10_F32: f32

Source: constants.joule:215