Advertisement
Guest User

Untitled

a guest
Aug 26th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. class Resolution: Hashable {
  2.  
  3. var horizontal: Int
  4. var vertical: Int
  5.  
  6. var hashValue: Int {
  7. return horizontal.hashValue ^ vertical.hashValue &* 16777619
  8.  
  9. }
  10.  
  11. init(horizontal: Int, vertical: Int) {
  12. self.horizontal = horizontal
  13. self.vertical = vertical
  14. }
  15.  
  16. static func == (lhs: Resolution, rhs: Resolution) -> Bool {
  17. return lhs.vertical == rhs.vertical && lhs.horizontal == rhs.vertical
  18. }
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement