Torus: correct the cross_section_normal method -- again

i should add integration tests
This commit is contained in:
2022-08-12 02:23:53 -07:00
parent 084c5bc342
commit 658b8616d7

View File

@@ -107,7 +107,7 @@ impl HasCrossSection for Torus {
let axis = self.axis();
let to_coord = *coord - *self.center();
// this creates a normal which always points "counter-clockwise" along the shape
axis.cross(to_coord)
axis.cross(to_coord).with_mag(self.cross_section()).unwrap_or_default()
}
}