natural_constants
Pre-defined constants from all disciplines (math, physics, ...) as a Rust library.
Add this to your Cargo.toml file:
natural_constants = "0.2.0"
Currently the following modules exist:
- math
- physics
- chemistry
- biology
- engineering
- conversion
It's far from complete. So if your favorite constant is missing, just let me know.
What should go in ? Everything that you think is useful. Some constants may fit into multiple modules - we then have to decide which one.
- Why are you using long names for the constants ? Why not a simple character like 'c' ?
Well simple characters are often used ("overloaded") by various constants, so to avoid ambiguity the full name is used.
- But isn't that too complicated to type ? Now my code looks too ugly!
Well no one stops you from doing s.th. like this:
use *;
- What about pre-calculated stuff ?
Yes, why not ? If it's useful to you, it may also be useful to others.
This is an ongoing effort to make Rust more suitable for scientific / numeric computing, you can join the discussion here.
Other useful numeric / scientific crates:
- rand
- num
- fast_inv_sqrt
- vecmath
- cgmath-rs
- matrixmultiply
- nalgebra
- scirust
- beagle-rs
- ndarray
- statrs
- astro-rust
- rust-bio
- lapack
- rust-blas
- rust-gmp
- rust-gsl
- georust
- imageproc
- units
- simple_units