Created
January 7, 2019 14:17
-
-
Save andrevidela/dd0ca4da36329d3d78341c6e355ccf12 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// Protocol for 2D coordinate systems | |
| protocol TwoDimensions { | |
| associatedtype ComponentVal | |
| static func make2D(_ fst: ComponentVal, _ snd: ComponentVal) -> Self | |
| var fst: ComponentVal { get } // The first component | |
| var snd: ComponentVal { get } // The second component | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment