Torus: correct the cross_section_normal method -- again
i should add integration tests
This commit is contained in:
@@ -107,7 +107,7 @@ impl HasCrossSection for Torus {
|
|||||||
let axis = self.axis();
|
let axis = self.axis();
|
||||||
let to_coord = *coord - *self.center();
|
let to_coord = *coord - *self.center();
|
||||||
// this creates a normal which always points "counter-clockwise" along the shape
|
// 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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user