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.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] }
}