Add f32_float feature.

This commit is contained in:
Stephen Chung
2020-11-01 15:48:48 +08:00
parent 629e02f9da
commit a2e2b5e2ef
14 changed files with 109 additions and 46 deletions

View File

@@ -34,19 +34,19 @@ fn test_float_parse() -> Result<(), Box<EvalAltResult>> {
fn test_struct_with_float() -> Result<(), Box<EvalAltResult>> {
#[derive(Clone)]
struct TestStruct {
x: f64,
x: FLOAT,
}
impl TestStruct {
fn update(&mut self) {
self.x += 5.789_f64;
self.x += 5.789;
}
fn get_x(&mut self) -> f64 {
fn get_x(&mut self) -> FLOAT {
self.x
}
fn set_x(&mut self, new_x: f64) {
fn set_x(&mut self, new_x: FLOAT) {
self.x = new_x;
}