blob: 95d450cab49d04c979c2cf10e4fb8ffcff5cc022 (
plain)
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
33
34
|
//! Contains a collection of core modules used by other modules
//!
//! Also creates a shortcut for some common types
mod vector2;
mod vector3;
mod bound2;
mod bound3;
mod spectrum;
mod ray;
pub use vector2::{Vector2i, Vector2f};
pub use vector3::Vector3f;
pub use bound2::{Bound2i, Bound2f};
pub use bound3::Bound3f;
pub use spectrum::Spectrum;
pub use ray::Ray;
use crate::Number;
pub fn min<T: Number> (a: T, b: T) -> T {
if b < a {
return b;
}
a
}
pub fn max<T: Number> (a: T, b: T) -> T {
if b > a {
return b;
}
a
}
|