pub mod camera;
pub mod canvas;
pub mod intersections;
pub mod lights;
pub mod materials;
pub mod matrices;
pub mod rays;
pub mod shapes;
pub mod transformations;
pub mod tuples;
pub mod world;

/// Value considered close enough for PartialEq implementations.
pub const EPSILON: Float = 0.00001;

pub const BLACK: tuples::Color = tuples::Color::new(0., 0., 0.);
pub const WHITE: tuples::Color = tuples::Color::new(1., 1., 1.);

#[cfg(feature = "float-as-double")]
/// submodule to defined types, constants and methods when `Float` is defined as a `f64` using the
/// "float-as-double" cargo feature.
pub mod float {
    pub use std::f64::*;
    /// Alias of the `f64` type, to be used through out the codebase anywhere a default sized
    /// `Float` is necessary.
    pub type Float = f64;
}

#[cfg(not(feature = "float-as-double"))]
/// submodule to defined types, constants and methods when `Float` is defined as a `f32` when not using the
/// "float-as-double" cargo feature.
pub mod float {
    pub use std::f32::*;
    /// Alias of the `f32` type, to be used through out the codebase anywhere a default sized
    /// `Float` is necessary.
    pub type Float = f32;
}

pub use float::Float;
