Move FloatWrapper into types.
This commit is contained in:
@@ -134,26 +134,26 @@ mod print_debug_functions {
|
||||
#[cfg(not(feature = "no_float"))]
|
||||
#[rhai_fn(name = "print", name = "to_string")]
|
||||
pub fn print_f64(number: f64) -> ImmutableString {
|
||||
crate::ast::FloatWrapper::new(number).to_string().into()
|
||||
crate::types::FloatWrapper::new(number).to_string().into()
|
||||
}
|
||||
/// Convert the value of `number` into a string.
|
||||
#[cfg(not(feature = "no_float"))]
|
||||
#[rhai_fn(name = "print", name = "to_string")]
|
||||
pub fn print_f32(number: f32) -> ImmutableString {
|
||||
crate::ast::FloatWrapper::new(number).to_string().into()
|
||||
crate::types::FloatWrapper::new(number).to_string().into()
|
||||
}
|
||||
/// Convert the value of `number` into a string.
|
||||
#[cfg(not(feature = "no_float"))]
|
||||
#[rhai_fn(name = "debug", name = "to_debug")]
|
||||
pub fn debug_f64(number: f64) -> ImmutableString {
|
||||
let number = crate::ast::FloatWrapper::new(number);
|
||||
let number = crate::types::FloatWrapper::new(number);
|
||||
format!("{number:?}").into()
|
||||
}
|
||||
/// Convert the value of `number` into a string.
|
||||
#[cfg(not(feature = "no_float"))]
|
||||
#[rhai_fn(name = "debug", name = "to_debug")]
|
||||
pub fn debug_f32(number: f32) -> ImmutableString {
|
||||
let number = crate::ast::FloatWrapper::new(number);
|
||||
let number = crate::types::FloatWrapper::new(number);
|
||||
format!("{number:?}").into()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user