Skip to content

Commit 8202c48

Browse files
committed
Fix comments
1 parent d151899 commit 8202c48

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

editor/src/messages/tool/common_functionality/transformation_cage.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -636,11 +636,12 @@ impl BoundingBoxManager {
636636
fn overlay_display_category(&self) -> TransformCageSizeCategory {
637637
let quad = self.transform * Quad::from_box(self.bounds);
638638

639+
// Check if the bounds are essentially the same because the width and height are smaller than MAX_LENGTH_FOR_NO_WIDTH_OR_HEIGHT
639640
if self.is_bounds_point() {
640641
return TransformCageSizeCategory::Point;
641642
}
642643

643-
// Check if the area is essentially zero because either the width or height is smaller than an epsilon
644+
// Check if the area is essentially zero because either the width or height is smaller than MAX_LENGTH_FOR_NO_WIDTH_OR_HEIGHT
644645
if self.is_bounds_flat() {
645646
return TransformCageSizeCategory::Flat;
646647
}
@@ -669,7 +670,7 @@ impl BoundingBoxManager {
669670
(self.bounds[0] - self.bounds[1]).abs().cmple(DVec2::splat(MAX_LENGTH_FOR_NO_WIDTH_OR_HEIGHT)).any()
670671
}
671672

672-
/// Determine if these bounds are point ([`TransformCageSizeCategory::Point`]), which means that the width and height are essentially zero and the bounds are a point with no area. This can happen on actual points (axis-aligned, i.e. drawn at a single pixel) or when an element is scaled to zero in both X and Y. A point transform cage cannot be rotated by a transformation, and its local space remains a point.
673+
/// Determine if these bounds are point ([`TransformCageSizeCategory::Point`]), which means that the width and height are essentially zero and the bounds are a point with no area. This can happen on points when an element is scaled to zero in both X and Y. A point transform cage cannot be rotated by a transformation, and its local space remains a point.
673674
fn is_bounds_point(&self) -> bool {
674675
(self.bounds[0] - self.bounds[1]).abs().cmple(DVec2::splat(MAX_LENGTH_FOR_NO_WIDTH_OR_HEIGHT)).all()
675676
}

0 commit comments

Comments
 (0)