[][src]Struct colorspace::spd::SPD

#[repr(align(16))]pub struct SPD {
    pub values: [f32; 40],
}

A lightweight SPD using a fixed shape of 380-770nm with a 10nm interval. All tristimulus calculations are performed with a D65 whitepoint and CIE 1931 2-degree standard observer CMFs.

Fields

values: [f32; 40]

Implementations

impl SPD[src]

pub fn new(values: [f32; 40]) -> SPD[src]

Create a new SPD with the given values

pub fn constant(v: f32) -> SPD[src]

Create a new SPD where all samples have the same value

pub fn to_xyz(&self) -> XYZf32[src]

Convert this SPD to an XYZf32 assuming a D65 illuminant and CIE 1931 2-degree CMFs

This will use AVX if enabled

pub fn iter(&self) -> impl Iterator<Item = &f32>[src]

pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut f32>[src]

Trait Implementations

impl Clone for SPD[src]

impl Debug for SPD[src]

impl Display for SPD[src]

impl<'_> Mul<&'_ SPD> for &'_ SPD[src]

type Output = SPD

The resulting type after applying the * operator.

impl PartialEq<SPD> for SPD[src]

Auto Trait Implementations

impl RefUnwindSafe for SPD

impl Send for SPD

impl Sync for SPD

impl Unpin for SPD

impl UnwindSafe for SPD

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,