Last active
January 14, 2016 09:33
-
-
Save fitomad/5d585332a7384a5a8f85 to your computer and use it in GitHub Desktop.
Tontadas
This file contains 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
/// | |
/// La aportación de **Louis Van Gaal** | |
/// al desarrollo del lenguaje Swift. | |
/// | |
/// La explicación en este vídeo de [Youtube](https://www.youtube.com/watch?v=Od5PQoRr7hU) | |
/// | |
extension SignedIntegerType | |
{ | |
/** | |
Convierte un número entero en negativo | |
*/ | |
public mutating func siempreNegativaNuncaPositiva() -> Void | |
{ | |
if self > 0 | |
{ | |
self *= -1 | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment