Improved consonant precision

This commit is contained in:
PaddiM8 2020-12-28 23:06:53 +01:00
parent 6518194582
commit 865947dccd

View File

@ -11,13 +11,34 @@ pub const INIT: &'static str = "unit deg = (rad*180)/pi";
lazy_static! { lazy_static! {
pub static ref CONSTANTS: HashMap<&'static str, f64> = { pub static ref CONSTANTS: HashMap<&'static str, f64> = {
let mut m = HashMap::new(); let mut m = HashMap::new();
m.insert("pi", 3.14159265); m.insert(
m.insert("π", 3.14159265); "pi",
m.insert("e", 2.71828183); 3.1415926535897932384626433832795028841971693993751058209749445923,
m.insert("tau", 6.28318530); );
m.insert("τ", 6.28318530); m.insert(
m.insert("phi", 1.61803399); "π",
m.insert("ϕ", 1.61803399); 3.1415926535897932384626433832795028841971693993751058209749445923,
);
m.insert(
"e",
2.7182818284590452353602874713526624977572470936999595749669676277,
);
m.insert(
"tau",
6.2831853071795864769252867665590057683943387987502116419498891846,
);
m.insert(
"τ",
6.2831853071795864769252867665590057683943387987502116419498891846,
);
m.insert(
"phi",
1.6180339887498948482045868343656381177203091798057628621354486227,
);
m.insert(
"ϕ",
1.6180339887498948482045868343656381177203091798057628621354486227,
);
m m
}; };
pub static ref UNARY_FUNCS: HashMap<&'static str, (UnaryFuncInfo, &'static str)> = { pub static ref UNARY_FUNCS: HashMap<&'static str, (UnaryFuncInfo, &'static str)> = {