mirror of
https://github.com/PaddiM8/kalker.git
synced 2025-06-27 05:02:32 +02:00
Added gamma function.
This commit is contained in:
parent
e3b4e4e4f2
commit
b4f129835a
@ -46,6 +46,8 @@ pub const UNARY_FUNCS: phf::Map<&'static str, UnaryFuncInfo> = phf::phf_map! {
|
|||||||
"exp" => UnaryFuncInfo(exp, Other),
|
"exp" => UnaryFuncInfo(exp, Other),
|
||||||
"floor" => UnaryFuncInfo(floor, Other),
|
"floor" => UnaryFuncInfo(floor, Other),
|
||||||
"frac" => UnaryFuncInfo(frac, Other),
|
"frac" => UnaryFuncInfo(frac, Other),
|
||||||
|
"gamma" => UnaryFuncInfo(gamma, Other),
|
||||||
|
"Γ" => UnaryFuncInfo(gamma, Other),
|
||||||
"log" => UnaryFuncInfo(log, Other),
|
"log" => UnaryFuncInfo(log, Other),
|
||||||
"ln" => UnaryFuncInfo(ln, Other),
|
"ln" => UnaryFuncInfo(ln, Other),
|
||||||
"round" => UnaryFuncInfo(round, Other),
|
"round" => UnaryFuncInfo(round, Other),
|
||||||
@ -243,6 +245,10 @@ mod funcs {
|
|||||||
x.fract()
|
x.fract()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn gamma(x: Float) -> Float {
|
||||||
|
x.gamma()
|
||||||
|
}
|
||||||
|
|
||||||
pub fn hyp(x: Float, y: Float) -> Float {
|
pub fn hyp(x: Float, y: Float) -> Float {
|
||||||
x.hypot(&y)
|
x.hypot(&y)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user