toLatex method

String toLatex()

Implementation

String toLatex() {
  if (imaginary == 0) {
    return real.toString();
  }
  return real.toString() + " + " + imaginary.toString() + "i";
}