use crate::{Point3, Real};
#[derive(Clone, Debug, PartialEq)]
pub struct Aabb {
pub mins: Point3,
pub maxs: Point3,
}
impl Aabb {
#[inline]
pub const fn new(mins: Point3, maxs: Point3) -> Self {
Self { mins, maxs }
}
#[inline]
pub fn origin() -> Self {
let zero = Real::zero();
Self::new(
Point3::new(zero.clone(), zero.clone(), zero.clone()),
Point3::new(zero.clone(), zero.clone(), zero),
)
}
}