[−][src]Struct colorspace::xyz::XYZ
XYZ color type
Fields
x: T
y: T
z: T
Implementations
impl<T> XYZ<T> where
T: Real,
[src]
T: Real,
pub fn new(x: T, y: T, z: T) -> XYZ<T>
[src]
pub fn from_scalar(a: T) -> XYZ<T>
[src]
pub fn normalized(&self) -> XYZ<T>
[src]
Returns a unit-luminance version of this color.
pub fn abs(&self) -> XYZ<T>
[src]
impl<T> XYZ<T> where
T: Real + One,
[src]
T: Real + One,
pub fn from_chromaticity(c: XYY<T>) -> XYZ<T>
[src]
Creates a new XYZ from the given xyY
coordinates
pub fn from_xy(x: T, y: T) -> XYZ<T>
[src]
pub fn normalized_y(&self) -> XYZ<T>
[src]
Trait Implementations
impl<T> Add<T> for XYZ<T> where
T: Real,
[src]
T: Real,
Addition by a T
type Output = XYZ<T>
The resulting type after applying the +
operator.
fn add(self, rhs: T) -> XYZ<T>
[src]
impl<T> Add<XYZ<T>> for XYZ<T> where
T: Real,
[src]
T: Real,
Addition operator
type Output = XYZ<T>
The resulting type after applying the +
operator.
fn add(self, rhs: XYZ<T>) -> XYZ<T>
[src]
impl<T> AddAssign<XYZ<T>> for XYZ<T> where
T: Real,
[src]
T: Real,
fn add_assign(&mut self, rhs: XYZ<T>)
[src]
impl<T> Bounded for XYZ<T> where
T: Real,
[src]
T: Real,
impl<T: Clone> Clone for XYZ<T> where
T: Real,
[src]
T: Real,
impl<T: Copy> Copy for XYZ<T> where
T: Real,
[src]
T: Real,
impl<T: Debug> Debug for XYZ<T> where
T: Real,
[src]
T: Real,
impl<T: Default> Default for XYZ<T> where
T: Real,
[src]
T: Real,
impl<T> Display for XYZ<T> where
T: Real,
[src]
T: Real,
impl<T> Div<T> for XYZ<T> where
T: Real,
[src]
T: Real,
Division by a T
type Output = XYZ<T>
The resulting type after applying the /
operator.
fn div(self, rhs: T) -> XYZ<T>
[src]
impl<T> Div<XYZ<T>> for XYZ<T> where
T: Real,
[src]
T: Real,
Division operator
type Output = XYZ<T>
The resulting type after applying the /
operator.
fn div(self, rhs: XYZ<T>) -> XYZ<T>
[src]
impl<T> From<XYY<T>> for XYZ<T> where
T: Real,
[src]
T: Real,
impl<T> From<XYZ<T>> for XYY<T> where
T: Real,
[src]
T: Real,
impl From<XYZ<f64>> for XYZf32
[src]
impl<T> Index<usize> for XYZ<T> where
T: Real,
[src]
T: Real,
impl<T> IndexMut<usize> for XYZ<T> where
T: Real,
[src]
T: Real,
impl<T> Mul<T> for XYZ<T> where
T: Real,
[src]
T: Real,
Multiplication by a f32
type Output = XYZ<T>
The resulting type after applying the *
operator.
fn mul(self, rhs: T) -> XYZ<T>
[src]
impl<T> Mul<XYZ<T>> for XYZ<T> where
T: Real,
[src]
T: Real,
Multiplication operator
type Output = XYZ<T>
The resulting type after applying the *
operator.
fn mul(self, rhs: XYZ<T>) -> XYZ<T>
[src]
impl<T> Mul<XYZ<T>> for Matrix33<T> where
T: Real,
[src]
T: Real,
type Output = XYZ<T>
The resulting type after applying the *
operator.
fn mul(self, xyz: XYZ<T>) -> XYZ<T>
[src]
impl<T> Neg for XYZ<T> where
T: Real,
[src]
T: Real,
Unary negation
impl<T> One for XYZ<T> where
T: Real,
[src]
T: Real,
fn one() -> XYZ<T>
[src]
fn set_one(&mut self)
[src]
fn is_one(&self) -> bool where
Self: PartialEq<Self>,
[src]
Self: PartialEq<Self>,
impl<T: PartialEq> PartialEq<XYZ<T>> for XYZ<T> where
T: Real,
[src]
T: Real,
impl<T: PartialOrd> PartialOrd<XYZ<T>> for XYZ<T> where
T: Real,
[src]
T: Real,
fn partial_cmp(&self, other: &XYZ<T>) -> Option<Ordering>
[src]
fn lt(&self, other: &XYZ<T>) -> bool
[src]
fn le(&self, other: &XYZ<T>) -> bool
[src]
fn gt(&self, other: &XYZ<T>) -> bool
[src]
fn ge(&self, other: &XYZ<T>) -> bool
[src]
impl<T> StructuralPartialEq for XYZ<T> where
T: Real,
[src]
T: Real,
impl<T> Sub<T> for XYZ<T> where
T: Real,
[src]
T: Real,
Subtraction by a T
type Output = XYZ<T>
The resulting type after applying the -
operator.
fn sub(self, rhs: T) -> XYZ<T>
[src]
impl<T> Sub<XYZ<T>> for XYZ<T> where
T: Real,
[src]
T: Real,
Subtraction operator
type Output = XYZ<T>
The resulting type after applying the -
operator.
fn sub(self, rhs: XYZ<T>) -> XYZ<T>
[src]
impl Sum<XYZ<f32>> for XYZf32
[src]
impl<T> Zero for XYZ<T> where
T: Real,
[src]
T: Real,
Auto Trait Implementations
impl<T> RefUnwindSafe for XYZ<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for XYZ<T> where
T: Send,
T: Send,
impl<T> Sync for XYZ<T> where
T: Sync,
T: Sync,
impl<T> Unpin for XYZ<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for XYZ<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,