aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2021-01-25 14:43:46 +0100
committerJulian T <julian@jtle.dk>2021-01-25 14:43:46 +0100
commit33a35c50c20e863123642c8c9ea31dfc006945f6 (patch)
tree6bbdd9f0f5d4deddec50fca1c3dbff3f2878ffac /src/lib.rs
parent41ea2d8f94043d49fc26aaaa8030a73dcfdc2da9 (diff)
Started work on implementing vectors bounding and film
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs21
1 files changed, 21 insertions, 0 deletions
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<Output = Self> +
+ Mul<Output = Self>
+{}
+
+impl Number for usize {}
+impl Number for i32 {}
+impl Number for f32 {}
+
+// Used throughout the program
+type Float = f32;