feat: parse unicode pi, π

This commit is contained in:
electria 2026-10-19 17:46:02 -07:00
commit a520177183
Signed by: electria
SSH key fingerprint: SHA256:8LlB3ucPbBHqozqkhsNbaV5oG3SlzzqUj8FZDL6IPQs

View file

@ -10,7 +10,7 @@ impl Node {
Ok(match s { Ok(match s {
"c" => Self::from(299_792_458), "c" => Self::from(299_792_458),
"A" => Self::from(6.02214076e23), "A" => Self::from(6.02214076e23),
"pi" => Self::from(f64::consts::PI), "pi" | "π" => Self::from(f64::consts::PI),
// Planck's constant, in J*s (joule-seconds) // Planck's constant, in J*s (joule-seconds)
"h" => Self::from(6.62607015e-34), "h" => Self::from(6.62607015e-34),
"e" => Self::from(f64::consts::E), "e" => Self::from(f64::consts::E),