Skip to content

Implement basic geometry functions #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 7, 2015
Merged

Conversation

romanroibu
Copy link
Contributor

Implemented some basic geometry functions

extension CGSize: Equatable { }

public func ==(lhs: CGSize, rhs: CGSize) -> Bool {
return (lhs.width == rhs.width) && (lhs.height == lhs.height)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lhs.height == lhs.height is always true. You want lhs.height == rhs.height

@parkera
Copy link
Contributor

parkera commented Dec 6, 2015

Let's rebase this after incorporating @johankool 's comments so we can merge it in. Thanks!

@romanroibu
Copy link
Contributor Author

Done, thanks!

@@ -66,6 +88,12 @@ public struct CGRect {
}
}

extension CGRect: Equatable { }

public func ==(lhs: CGRect, rhs: CGRect) -> Bool {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This functionality on Darwin actually lives in CoreGraphics not in Foundation

@phausler
Copy link
Contributor

phausler commented Dec 7, 2015

Looks fine to me.

phausler added a commit that referenced this pull request Dec 7, 2015
Implement basic geometry functions
@phausler phausler merged commit b5425d1 into swiftlang:master Dec 7, 2015
atrick pushed a commit to atrick/swift-corelibs-foundation that referenced this pull request Jan 12, 2021
[test] Remove defunct `static var allTests` everywhere
kateinoigakukun pushed a commit to kateinoigakukun/swift-corelibs-foundation that referenced this pull request Apr 29, 2021
Add integration test for testing SwiftPM's code coverage support
kateinoigakukun pushed a commit to kateinoigakukun/swift-corelibs-foundation that referenced this pull request Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants