Class Complex

java.lang.Object
edu.ntnu.stud.chaosgame.model.data.Vector2D
edu.ntnu.stud.chaosgame.model.data.Complex

public class Complex extends Vector2D
Class representing a complex number.
  • Constructor Details

    • Complex

      public Complex(double real, double imag)
      Create a new complex number.
      Parameters:
      real - The real part of the complex number.
      imag - The imaginary part of the complex number.
  • Method Details

    • sqrt

      public Complex sqrt()
      Get the square root of the complex number.
      Returns:
      The square root of the complex number.