rhaiscript / rhai

Rhai - An embedded scripting language for Rust.
https://crates.io/crates/rhai
Apache License 2.0
3.63k stars 174 forks source link

to_float not implemented for float #844

Closed voelklmichael closed 4 months ago

voelklmichael commented 4 months ago

Please implement "to_float" for float. Ideally, implement "to_int" also for "int", and "to_decimal" for "decimal". (cf. [https://rhai.rs/book/ref/convert.html?highlight=to_float#convert-between-integer-and-floating-point])

This was discussed on discord "#general", 20. February, 2024.

schungx commented 4 months ago

Yes, these will all be added in the next release. Do you need it urgently?

voelklmichael commented 4 months ago

No, I do not need it urgently. That was just meant as a friendly reminder/documentation (which I can link to). Thank you for the quick feedback.

schungx commented 4 months ago

You can try out the latest drop which has it.

voelklmichael commented 4 months ago

Ok, thank you. Works.