Add SubAssign, Add and Sub to Pixel trait requirements
This commit is contained in:
1 parent
e75d56e23a
commit
26a03c002a
2 files changed
+61
-31
No files matched your search
@@ -36,8 +36,11 @@ pub trait Format<P> {
|
||||
|
||||
pub trait Pixel:
|
||||
std::ops::AddAssign
|
||||
+ std::ops::SubAssign
|
||||
+ std::ops::MulAssign<f32>
|
||||
+ std::ops::DivAssign<f32>
|
||||
+ std::ops::Add<Output = Self>
|
||||
+ std::ops::Sub<Output = Self>
|
||||
+ std::ops::Mul<f32, Output = Self>
|
||||
+ std::ops::Div<f32, Output = Self>
|
||||
+ Clone
|
||||
@@ -51,8 +54,11 @@ pub trait Pixel:
|
||||
|
||||
impl<P> Pixel for P where
|
||||
P: std::ops::AddAssign
|
||||
+ std::ops::SubAssign
|
||||
+ std::ops::MulAssign<f32>
|
||||
+ std::ops::DivAssign<f32>
|
||||
+ std::ops::Add<Output = Self>
|
||||
+ std::ops::Sub<Output = Self>
|
||||
+ std::ops::Mul<f32, Output = Self>
|
||||
+ std::ops::Div<f32, Output = Self>
|
||||
+ Clone
|
||||
|
||||
Reference in new issue
Block a user