style: cargo fmt
Build & Publish Release / Build Packages & Publish to Gitea (push) Successful in 6m29s
Build & Publish Release / Build Packages & Publish to Gitea (push) Successful in 6m29s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+6
-5
@@ -616,12 +616,13 @@ impl Stroke {
|
|||||||
pub fn recompute_aabb(&mut self) {
|
pub fn recompute_aabb(&mut self) {
|
||||||
// Ohne Zwischenliste: läuft beim Ziehen einer Auswahl für jeden Strich und jede Bewegung
|
// Ohne Zwischenliste: läuft beim Ziehen einer Auswahl für jeden Strich und jede Bewegung
|
||||||
let bounds = |mut pts: Box<dyn Iterator<Item = glam::Vec2> + '_>| {
|
let bounds = |mut pts: Box<dyn Iterator<Item = glam::Vec2> + '_>| {
|
||||||
pts.next().map_or(Aabb::new(glam::Vec2::ZERO, glam::Vec2::ZERO), |first| {
|
pts.next()
|
||||||
pts.fold(Aabb::new(first, first), |mut aabb, p| {
|
.map_or(Aabb::new(glam::Vec2::ZERO, glam::Vec2::ZERO), |first| {
|
||||||
aabb.expand_by_point(p);
|
pts.fold(Aabb::new(first, first), |mut aabb, p| {
|
||||||
aabb
|
aabb.expand_by_point(p);
|
||||||
|
aabb
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
|
||||||
};
|
};
|
||||||
self.aabb = if !self.points.is_empty() {
|
self.aabb = if !self.points.is_empty() {
|
||||||
bounds(Box::new(self.points.iter().map(|s| s.position)))
|
bounds(Box::new(self.points.iter().map(|s| s.position)))
|
||||||
|
|||||||
Reference in New Issue
Block a user