use core::marker::PhantomData;
use float::Float;
use rgb::{RgbSpace, RgbStandard};
use luma::LumaStandard;
use encoding::TransferFn;
use white_point::WhitePoint;
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct Linear<S>(PhantomData<S>);
impl<S: RgbSpace> RgbStandard for Linear<S> {
type Space = S;
type TransferFn = LinearFn;
}
impl<Wp: WhitePoint> LumaStandard for Linear<Wp> {
type WhitePoint = Wp;
type TransferFn = LinearFn;
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct LinearFn;
impl TransferFn for LinearFn {
#[inline(always)]
fn into_linear<T: Float>(x: T) -> T {
x
}
#[inline(always)]
fn from_linear<T: Float>(x: T) -> T {
x
}
}