Add atan2 and hypot functions.
This commit is contained in:
@@ -170,6 +170,10 @@ mod trig_functions {
|
||||
pub fn atan(x: FLOAT) -> FLOAT {
|
||||
x.atan()
|
||||
}
|
||||
#[rhai_fn(name = "atan")]
|
||||
pub fn atan2(x: FLOAT, y: FLOAT) -> FLOAT {
|
||||
x.atan2(y)
|
||||
}
|
||||
pub fn asinh(x: FLOAT) -> FLOAT {
|
||||
x.asinh()
|
||||
}
|
||||
@@ -179,6 +183,9 @@ mod trig_functions {
|
||||
pub fn atanh(x: FLOAT) -> FLOAT {
|
||||
x.atanh()
|
||||
}
|
||||
pub fn hypot(x: FLOAT, y: FLOAT) -> FLOAT {
|
||||
x.hypot(y)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "no_float"))]
|
||||
|
Reference in New Issue
Block a user