From 678d0f5e338319bc70ee6f387701719959e3659b Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Wed, 17 Feb 2021 14:05:35 +0800 Subject: [PATCH] Fix f32_float build. --- src/packages/arithmetic.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/packages/arithmetic.rs b/src/packages/arithmetic.rs index 39cae250..c86c61cc 100644 --- a/src/packages/arithmetic.rs +++ b/src/packages/arithmetic.rs @@ -250,9 +250,9 @@ mod f32_functions { pub fn modulo(x: f32, y: f32) -> f32 { x % y } - #[rhai_fn(name = "**", return_raw)] - pub fn pow_f_f(x: f32, y: f32) -> Result> { - Ok(Dynamic::from(x.powf(y))) + #[rhai_fn(name = "**")] + pub fn pow_f_f(x: f32, y: f32) -> f32 { + x.powf(y) } } @@ -355,7 +355,7 @@ mod f64_functions { pub fn modulo(x: f64, y: f64) -> f64 { x % y } - #[rhai_fn(name = "**", return_raw)] + #[rhai_fn(name = "**")] pub fn pow_f_f(x: f64, y: f64) -> f64 { x.powf(y) }