diff options
author | Julian T <julian@jtle.dk> | 2021-08-05 15:44:40 +0200 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2021-08-05 15:44:40 +0200 |
commit | 3ef8f4d918406eec6bdc29e0ebd883fabfac9b2e (patch) | |
tree | aa4b1aac1e165821c16f222ebfb9212a9740e98b /src/lib.rs | |
parent | 45119506c0293fdde6cef35f6e6f82d4055b46b6 (diff) |
Add picture for c5505ab84820248c6dba35fc06aef9e0ced183derendered
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/lib.rs b/src/lib.rs deleted file mode 100644 index 0e6674d..0000000 --- a/src/lib.rs +++ /dev/null @@ -1,41 +0,0 @@ -pub mod core; -pub mod camera; -pub mod render; -pub mod world; -pub mod trace; -pub mod sample; -pub mod material; - -use std::ops::{Add, Sub, Mul, DivAssign, AddAssign, Neg, Div}; -use std::cmp; -use std::fmt; -use std::f64::consts::PI; - -/// Trait used to implement generics -/// -/// This is used in Bound and Vectors -pub trait Number: - Copy + - cmp::PartialOrd + - Sub<Output = Self> + - Add<Output = Self> + - Mul<Output = Self> + - Neg<Output = Self> + - Div<Output = Self> + - DivAssign + - AddAssign + - fmt::Display -{} - -impl Number for i32 {} -impl Number for f32 {} -impl Number for f64 {} - -/// Used for representing floating point values throughout the program -/// -/// A higher precision type will require more ram -pub type Float = f64; - -pub const M_PI: Float = PI; -pub const NEAR_ZERO: Float = 1e-8; -pub const INFTY: Float = f64::INFINITY; |