Fix f32_float build.
This commit is contained in:
parent
a2277d07f3
commit
678d0f5e33
@ -250,9 +250,9 @@ mod f32_functions {
|
|||||||
pub fn modulo(x: f32, y: f32) -> f32 {
|
pub fn modulo(x: f32, y: f32) -> f32 {
|
||||||
x % y
|
x % y
|
||||||
}
|
}
|
||||||
#[rhai_fn(name = "**", return_raw)]
|
#[rhai_fn(name = "**")]
|
||||||
pub fn pow_f_f(x: f32, y: f32) -> Result<Dynamic, Box<EvalAltResult>> {
|
pub fn pow_f_f(x: f32, y: f32) -> f32 {
|
||||||
Ok(Dynamic::from(x.powf(y)))
|
x.powf(y)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -355,7 +355,7 @@ mod f64_functions {
|
|||||||
pub fn modulo(x: f64, y: f64) -> f64 {
|
pub fn modulo(x: f64, y: f64) -> f64 {
|
||||||
x % y
|
x % y
|
||||||
}
|
}
|
||||||
#[rhai_fn(name = "**", return_raw)]
|
#[rhai_fn(name = "**")]
|
||||||
pub fn pow_f_f(x: f64, y: f64) -> f64 {
|
pub fn pow_f_f(x: f64, y: f64) -> f64 {
|
||||||
x.powf(y)
|
x.powf(y)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user