Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Tontadas
///
/// 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
You can’t perform that action at this time.