aboutsummaryrefslogtreecommitdiff
path: root/src/core/spectrum.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/spectrum.rs')
-rw-r--r--src/core/spectrum.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/spectrum.rs b/src/core/spectrum.rs
index 727a1b6..9cca7dc 100644
--- a/src/core/spectrum.rs
+++ b/src/core/spectrum.rs
@@ -41,6 +41,18 @@ impl std::ops::Mul<Float> for Spectrum {
}
}
+impl std::ops::Mul for Spectrum {
+ type Output = Spectrum;
+
+ fn mul(self, op: Self) -> Self::Output {
+ Self::Output::new_rgb(
+ self.c[0] * op.c[0],
+ self.c[1] * op.c[1],
+ self.c[2] * op.c[2],
+ )
+ }
+}
+
impl std::ops::Div<Float> for Spectrum {
type Output = Spectrum;