1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
pub mod vec;
pub mod ray;
pub mod hittable;
pub use vec::*;
pub use ray::*;
pub use hittable::*;
pub use std::f64::consts::PI as PI;
pub const INFINITY: f64 = f64::INFINITY;
pub use rand::prelude::*;
pub fn random_float() -> f64 {
thread_rng().gen_range(0.0..1.)
}
pub fn random_float_with_range(min: f64, max: f64) -> f64 {
thread_rng().gen_range(min..max)
}
pub fn degree_to_radians(d: f64) -> f64 {
d * PI / 180.
}
pub mod camera;
pub use camera::*;
pub mod material;
pub use material::*;