aboutsummaryrefslogtreecommitdiff
path: root/src/core/spectrum.rs
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2021-02-07 17:52:30 +0100
committerJulian T <julian@jtle.dk>2021-02-07 17:52:46 +0100
commitc24d1e52b3f173ba5f4cc04f5a6a449a011a60c7 (patch)
treeff39abb0473a78aa15fbd2ab4c7f5c82660fe3ab /src/core/spectrum.rs
parent33e747fa1c0957546c10e4d7b490ac7fbb0fd2d2 (diff)
Add reflecting material
Diffstat (limited to 'src/core/spectrum.rs')
-rw-r--r--src/core/spectrum.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/spectrum.rs b/src/core/spectrum.rs
index 9cca7dc..c33d3af 100644
--- a/src/core/spectrum.rs
+++ b/src/core/spectrum.rs
@@ -12,6 +12,8 @@ pub struct Spectrum {
}
impl Spectrum {
+ pub const ZERO: Self = Spectrum { c: [0.0; 3] };
+
pub fn new_rgb(r: Float, g: Float, b: Float) -> Spectrum {
Spectrum { c: [r, g, b] }
}