fix(fields): fix equations

This commit is contained in:
Nova
2022-09-16 16:57:05 -04:00
parent fb1f5bad97
commit a2f313774b
2 changed files with 3 additions and 7 deletions

View File

@@ -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(())
}