Const

Struct Const 

Source
pub struct Const;

Implementations§

Source§

impl Const

Source

pub const PI: f64 = 3.1415926535897931f64

Source

pub const E: f64 = 2.7182818284590451f64

Source

pub const GOLDEN_RATIO: f64 = 1.6180339887498949f64

Source

pub const SQRT_2: f64 = 1.4142135623730951f64

Source

pub const LN_2: f64 = 0.69314718055994529f64

Source

pub const LN_10: f64 = 2.3025850929940459f64

Source

pub const EULER_MASCHERONI: f64 = 0.57721566490153287f64

Source

pub const SPEED_OF_LIGHT: f64 = 299792458f64

Source

pub const GRAVITATIONAL_CONSTANT: f64 = 6.6742999999999994E-11f64

Source

pub const PLANCK_CONSTANT: f64 = 6.6260701499999998E-34f64

Source

pub const REDUCED_PLANCK_CONSTANT: f64 = 1.0545718176461565E-34f64

Source

pub const BOLTZMANN_CONSTANT: f64 = 1.3806490000000001E-23f64

Source

pub const ELEMENTARY_CHARGE: f64 = 1.6021766339999999E-19f64

Source

pub const ELECTRON_MASS: f64 = 9.1093837015000007E-31f64

Source

pub const PROTON_MASS: f64 = 1.6726219236900001E-27f64

Source

pub const NEUTRON_MASS: f64 = 1.6749274713999998E-27f64

Source

pub const AVOGADRO_CONSTANT: f64 = 6.0221407599999999E+23f64

Source

pub const VACUUM_PERMITTIVITY: f64 = 8.8541878128000006E-12f64

Source

pub const VACUUM_PERMEABILITY: f64 = 1.2566370621199999E-6f64

Source

pub const FINE_STRUCTURE_CONSTANT: f64 = 0.0072973525693000004f64

Source

pub const RYDBERG_CONSTANT: f64 = 10973731.568159999f64

Source

pub const ATOMIC_MASS_UNIT: f64 = 1.6605390666E-27f64

Source

pub const FARADAY_CONSTANT: f64 = 96485.332123100001f64

Source

pub const GAS_CONSTANT: f64 = 8.3144626181532395f64

Source

pub const STEFAN_BOLTZMANN_CONSTANT: f64 = 5.6703744189999999E-8f64

Source

pub const WIEN_DISPLACEMENT_CONSTANT: f64 = 0.002897771955f64

Source

pub const ASTRONOMICAL_UNIT: f64 = 149597870700f64

Source

pub const LIGHT_YEAR: f64 = 9460730472580800f64

Source

pub const PARSEC: f64 = 30856775814913672f64

Source

pub const SOLAR_MASS: f64 = 1.988847E+30f64

Source

pub const EARTH_MASS: f64 = 5.9721669999999995E+24f64

Source

pub const EARTH_RADIUS: f64 = 6371000f64

Source

pub const SOLAR_RADIUS: f64 = 6.957E+8f64

Source

pub const HUBBLE_CONSTANT: f64 = 67.400000000000006f64

Source

pub fn pi(precision: Option<u32>) -> f64

Source

pub fn e(precision: Option<u32>) -> f64

Source

pub fn golden_ratio(precision: Option<u32>) -> f64

Source

pub fn sqrt_2(precision: Option<u32>) -> f64

Source

pub fn ln_2(precision: Option<u32>) -> f64

Source

pub fn ln_10(precision: Option<u32>) -> f64

Source

pub fn euler_mascheroni(precision: Option<u32>) -> f64

Source

pub fn speed_of_light(unit: Speed) -> Speed

Source

pub fn gravitational_constant(unit: Force) -> Force

Source

pub fn planck_constant(unit: Energy) -> Energy

Source

pub fn reduced_planck_constant(unit: Energy) -> Energy

Source

pub fn boltzmann_constant(unit: Energy) -> Energy

Source

pub fn elementary_charge(unit: ElectricCharge) -> ElectricCharge

Source

pub fn electron_mass(unit: Mass) -> Mass

Source

pub fn proton_mass(unit: Mass) -> Mass

Source

pub fn avogadro_constant(unit: Frequency) -> Frequency

Source

pub fn fine_structure_constant() -> f64

Source

pub fn rydberg_constant(unit: Frequency) -> Frequency

Source

pub fn atomic_mass_unit(unit: Mass) -> Mass

Source

pub fn faraday_constant(unit: ElectricCharge) -> ElectricCharge

Source

pub fn gas_constant(unit: Energy) -> Energy

Trait Implementations§

Source§

impl Clone for Const

Source§

fn clone(&self) -> Const

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Const

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Const

§

impl RefUnwindSafe for Const

§

impl Send for Const

§

impl Sync for Const

§

impl Unpin for Const

§

impl UnwindSafe for Const

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.