Move some declarations around within struct, no change in functionality

This commit is contained in:
Matthew Gordon 2020-01-10 16:21:38 -05:00
parent ffcfa0009c
commit 5f6733fdb0
1 changed files with 7 additions and 7 deletions

View File

@ -26,13 +26,6 @@ impl<T: RealField> Interval<T> {
}
}
pub fn intersection(self, b: Self) -> Self {
Interval {
min: self.min.max(b.min),
max: self.max.min(b.max),
}
}
pub fn is_degenerate(self) -> bool {
self.min == self.max
}
@ -44,6 +37,13 @@ impl<T: RealField> Interval<T> {
pub fn contains_value(&self, value: T) -> bool {
value >= self.min && value <= self.max
}
pub fn intersection(self, b: Self) -> Self {
Interval {
min: self.min.max(b.min),
max: self.max.min(b.max),
}
}
}
pub struct BoundingBox<T: RealField> {