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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
new_ratio!;
;
}
named_interval!;
named_interval!;
named_interval!;
// new_ratio_struct!(AbsoluteInterval, i64);
// impl core::ops::Add<Interval> for AbsoluteInterval {
// type Output = AbsoluteInterval;
// fn add(self, rhs: Interval) -> Self {
// self.as_ratio().add(rhs.as_ratio()).into()
// }
// }
// impl core::ops::AddAssign<Interval> for AbsoluteInterval {
// fn add_assign(&mut self, rhs: Interval) {
// *self = core::ops::Add::add(*self, rhs);
// }
// }
// impl core::ops::Sub for AbsoluteInterval {
// type Output = Interval;
// fn sub(self, rhs: Self) -> Interval {
// self.as_ratio().sub(rhs.as_ratio()).into()
// }
// }
// impl core::ops::Sub<Interval> for AbsoluteInterval {
// type Output = AbsoluteInterval;
// fn sub(self, rhs: Interval) -> AbsoluteInterval {
// self.as_ratio().sub(rhs.as_ratio()).into()
// }
// }
// impl core::ops::SubAssign<Interval> for AbsoluteInterval {
// fn sub_assign(&mut self, rhs: Interval) {
// *self = core::ops::Sub::sub(*self, rhs);
// }
// }
// impl core::ops::Div for AbsoluteInterval {
// type Output = Interval;
// fn div(self, rhs: Self) -> Self::Output {
// self.as_ratio().div(rhs.as_ratio()).into()
// }
// }
// new_ratio_conversions!(AbsoluteInterval, i64);