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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
pub trait Map<T, U> {
type Output;
fn map<F: 'static + Fn(U) -> T + Clone + Send + Sync>(self, f: F) -> Self::Output;
}
pub trait Diff {
fn diff(self, eps: f64) -> Self;
}
pub trait Dot<Rhs = Self> {
type Output;
fn dot(self, other: Rhs) -> Self::Output;
}
pub trait Cross<Rhs = Self> {
type Output;
fn cross(self, other: Rhs) -> Self::Output;
}
pub trait Norm {
type Output;
fn norm(self) -> Self::Output;
}
pub trait AABB {
type Corner;
fn aabb(&self) -> (Self::Corner, Self::Corner);
}