feat: support "arcsin" way of writing inverse trig

This commit is contained in:
electria 2026-10-31 17:00:25 -07:00
commit b7ce85c3f4
Signed by: electria
SSH key fingerprint: SHA256:8LlB3ucPbBHqozqkhsNbaV5oG3SlzzqUj8FZDL6IPQs

View file

@ -43,11 +43,11 @@ impl FromStr for Function {
"ln" => Ok(Self::Ln),
"sin" => Ok(Self::Sine),
"asin" => Ok(Self::ArcSine),
"asin" | "arcsin" => Ok(Self::ArcSine),
"cos" => Ok(Self::Cosine),
"acos" => Ok(Self::ArcCosine),
"acos" | "arccos" => Ok(Self::ArcCosine),
"tan" => Ok(Self::Tangent),
"atan" => Ok(Self::ArcTangent),
"atan" | "arctan" => Ok(Self::ArcTangent),
"sec" => Ok(Self::Secant),
"csc" => Ok(Self::CoSecant),
_ => Err(s.to_owned()),