mini_collide/sphere.rs
1use mini_math::Point;
2
3/// A sphere
4#[derive(Debug)]
5pub struct Sphere {
6 /// The center of the sphere
7 pub center: Point,
8 /// The radius of the sphere
9 pub radius: f32,
10}
11
12impl Sphere {
13 /// Construct a sphere from a center point and a radius
14 pub fn new(center: Point, radius: f32) -> Self {
15 Self { center, radius }
16 }
17}