Skip to content

Instantly share code, notes, and snippets.

@andrevidela
Last active January 7, 2019 14:40
Show Gist options
  • Save andrevidela/7b21cd3de0e0a1597ad9e46fc805dc6a to your computer and use it in GitHub Desktop.
Save andrevidela/7b21cd3de0e0a1597ad9e46fc805dc6a to your computer and use it in GitHub Desktop.
let i = Complex(real: 0.0, imm: 1.0)
let one = Complex(real: 1.0, imm: 0.0)
let other = Complex(real: Double.pi, imm: sqrt(2.0))
i * i == (-1) ◊ one
Complex.multId * i == i
other.magnitude
17.3 ◊ other
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment