Added gamma function.

This commit is contained in:
PaddiM8 2020-06-09 20:50:05 +02:00
parent 2119864a45
commit 9ab0abf1b5

View File

@ -46,6 +46,8 @@ pub const UNARY_FUNCS: phf::Map<&'static str, UnaryFuncInfo> = phf::phf_map! {
"exp" => UnaryFuncInfo(exp, Other),
"floor" => UnaryFuncInfo(floor, Other),
"frac" => UnaryFuncInfo(frac, Other),
"gamma" => UnaryFuncInfo(gamma, Other),
"Γ" => UnaryFuncInfo(gamma, Other),
"log" => UnaryFuncInfo(log, Other),
"ln" => UnaryFuncInfo(ln, Other),
"round" => UnaryFuncInfo(round, Other),
@ -243,6 +245,10 @@ mod funcs {
x.fract()
}
pub fn gamma(x: Float) -> Float {
x.gamma()
}
pub fn hyp(x: Float, y: Float) -> Float {
x.hypot(&y)
}