fix(fields): fix equations
This commit is contained in:
@@ -38,9 +38,9 @@ impl SphereField {
|
||||
}
|
||||
|
||||
pub fn set_radius_flex(node: &Node, _calling_client: Arc<Client>, data: &[u8]) -> Result<()> {
|
||||
let root = flexbuffers::Reader::get_root(data)?;
|
||||
let radius = flexbuffers::Reader::get_root(data)?.get_f64()? as f32;
|
||||
if let Field::Sphere(sphere_field) = node.field.get().unwrap().as_ref() {
|
||||
sphere_field.set_radius(root.as_f32());
|
||||
sphere_field.set_radius(radius);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user