extern crate siege_math;
extern crate float_cmp;
pub mod chromaticities;
pub mod colortemp;
pub mod cie1931;
pub mod srgb;
pub mod lms;
pub mod aces;
pub mod rec2020;
pub use chromaticities::*;
pub use colortemp::*;
pub use cie1931::*;
pub use srgb::*;
pub use lms::*;
pub use aces::*;
pub use rec2020::*;
pub fn color_level(irradiance: f32, white_point: f32) -> f32
{
let black_point = white_point / 100_000_f32;
if irradiance >= white_point {
1.0
}
else if irradiance <= black_point {
0.0
}
else {
(irradiance - black_point) / (white_point - black_point)
}
}