mirror of
https://github.com/PaddiM8/kalker.git
synced 2024-11-08 00:44:40 +01:00
Added hyp
function.
This commit is contained in:
parent
0dac28bb42
commit
dc59d7cac2
@ -54,6 +54,7 @@ pub const UNARY_FUNCS: phf::Map<&'static str, UnaryFuncInfo> = phf::phf_map! {
|
||||
pub const BINARY_FUNCS: phf::Map<&'static str, BinaryFuncInfo> = phf::phf_map! {
|
||||
"max" => BinaryFuncInfo(max, Other),
|
||||
"min" => BinaryFuncInfo(min, Other),
|
||||
"hyp" => BinaryFuncInfo(hyp, Other),
|
||||
"log" => BinaryFuncInfo(logx, Other),
|
||||
};
|
||||
|
||||
@ -219,6 +220,10 @@ mod funcs {
|
||||
x.fract()
|
||||
}
|
||||
|
||||
pub fn hyp(x: f64, y: f64) -> f64 {
|
||||
x.hypot(y)
|
||||
}
|
||||
|
||||
pub fn log(x: f64) -> f64 {
|
||||
x.log(10f64)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user