complex.nim: reformating [other]
This commit is contained in:
parent
3c62d41468
commit
8317de7648
1 changed files with 2 additions and 6 deletions
|
|
@ -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``.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue