pub trait Volume {
// Required method
fn volume(&self) -> f64;
}Expand description
The N-hypervolume of a geometry. In 2D, this is area and in 3D this is Volume.
§Example
use hoomd_geometry::{Volume, shape::Hypersphere};
const N: usize = 3;
let s = Hypersphere::<N>::with_radius(1.0.try_into()?);
let volume = s.volume();