The Apple documentation is somewhat ambiguous about how these should behave. https://stackoverflow.com/questions/35608638/accessing-cgrect-values-directly-vs-normalizing-them-in-swift-objective-c-rule and at least one GitHub code result suggest that standardizing a rectangle should move the origin if the size is negated (i.e. the rectangle should remain the same, vs. flip over the origin).
The current Rust implementation of CGRect::standardize only normalizes the size, leaving the origin unchanged.
Also, CGRect::is_empty returns !(self.size.width > 0.0 && self.size.height > 0.0), so will treat a negative-sized rectangle as empty.
The Apple documentation is somewhat ambiguous about how these should behave. https://stackoverflow.com/questions/35608638/accessing-cgrect-values-directly-vs-normalizing-them-in-swift-objective-c-rule and at least one GitHub code result suggest that standardizing a rectangle should move the origin if the size is negated (i.e. the rectangle should remain the same, vs. flip over the origin).
The current Rust implementation of
CGRect::standardizeonly normalizes the size, leaving the origin unchanged.Also,
CGRect::is_emptyreturns!(self.size.width > 0.0 && self.size.height > 0.0), so will treat a negative-sized rectangle as empty.