spherical-cow
spherical-cow copied to clipboard
Generics for numbers
Currently we are only using f32
s, but it would be good if this was generic over reals.
For example:
struct Sphere<N> {
center: Point3<N>,
radius: N,
}
impl<N: Float> Sphere<N> {
/// Creates a `new` sphere given the location of the spheres' `center` and its' `radius`.
pub fn new(center: Point3<N>, radius: N) -> Sphere {
... etc