Move some declarations around within struct, no change in functionality
This commit is contained in:
parent
ffcfa0009c
commit
5f6733fdb0
|
|
@ -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 {
|
pub fn is_degenerate(self) -> bool {
|
||||||
self.min == self.max
|
self.min == self.max
|
||||||
}
|
}
|
||||||
|
|
@ -44,6 +37,13 @@ impl<T: RealField> Interval<T> {
|
||||||
pub fn contains_value(&self, value: T) -> bool {
|
pub fn contains_value(&self, value: T) -> bool {
|
||||||
value >= self.min && value <= self.max
|
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> {
|
pub struct BoundingBox<T: RealField> {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue