txt: ## complex.md
  Complex
  
  Combined from primary sources listed below.
  
  # [In Cool](#___top "go to top of document")[§](#(Cool)_method_Complex "direct link")
  
  See primary documentation
  [in context](/type/Cool#method_Complex)
  for **method Complex**.
  
  ```raku
  multi method Complex()
  ```
  
  Coerces the invocant to a [`Numeric`](/type/Numeric) and calls its [`.Complex`](/routine/Complex) method. [Fails](/routine/fail) if the coercion to a [`Numeric`](/type/Numeric) cannot be done.
  
  ```raku
  say 1+1i.Complex;         # OUTPUT: «1+1i␤»
  say π.Complex;            # OUTPUT: «3.141592653589793+0i␤»
  say <1.3>.Complex;        # OUTPUT: «1.3+0i␤»
  say (-4/3).Complex;       # OUTPUT: «-1.3333333333333333+0i␤»
  say "foo".Complex.^name;  # OUTPUT: «Failure␤»
  ```
  
  # [In ComplexStr](#___top "go to top of document")[§](#(ComplexStr)_method_Complex "direct link")
  
  See primary documentation
  [in context](/type/ComplexStr#method_Complex)
  for **method Complex**.
  
  ```raku
  method Complex
  ```
  
  Returns the [`Complex`](/type/Complex) value of the `ComplexStr`.
  
  # [In role Real](#___top "go to top of document")[§](#(role_Real)_method_Complex "direct link")
  
  See primary documentation
  [in context](/type/Real#method_Complex)
  for **method Complex**.
  
  ```raku
  method Complex(Real:D: --> Complex:D)
  ```
  
  Converts the number to a [`Complex`](/type/Complex) with the number converted to a [`Num`](/type/Num) as its real part and 0e0 as the imaginary part.
  