mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
complex.nim: reformating [other]
This commit is contained in:
@@ -7,10 +7,6 @@
|
||||
# distribution, for details about the copyright.
|
||||
#
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## This module implements complex numbers.
|
||||
## Complex numbers are currently implemented as generic on a 64-bit or 32-bit float.
|
||||
|
||||
@@ -42,8 +38,8 @@ proc complex64*(re: float64; im: float64 = 0.0): Complex[float64] =
|
||||
|
||||
template im*(arg: typedesc[float32]): Complex32 = complex[float32](0, 1)
|
||||
template im*(arg: typedesc[float64]): Complex64 = complex[float64](0, 1)
|
||||
template im*(arg : float32): Complex32 = complex[float32](0, arg)
|
||||
template im*(arg : float64): Complex64 = complex[float64](0, arg)
|
||||
template im*(arg: float32): Complex32 = complex[float32](0, arg)
|
||||
template im*(arg: float64): Complex64 = complex[float64](0, arg)
|
||||
|
||||
proc abs*[T](z: Complex[T]): T =
|
||||
## Return the distance from (0,0) to ``z``.
|
||||
|
||||
Reference in New Issue
Block a user