From 33a35c50c20e863123642c8c9ea31dfc006945f6 Mon Sep 17 00:00:00 2001 From: Julian T Date: Mon, 25 Jan 2021 14:43:46 +0100 Subject: Started work on implementing vectors bounding and film --- src/lib.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/lib.rs (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..1d43855 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,21 @@ +mod vector; +mod bounding; +mod camera; +mod spectrum; + +use std::ops::{Sub, Mul}; +use std::cmp; + +pub trait Number: + Copy + + cmp::PartialOrd + + Sub + + Mul +{} + +impl Number for usize {} +impl Number for i32 {} +impl Number for f32 {} + +// Used throughout the program +type Float = f32; -- cgit v1.2.3