Class Complex

  • All Implemented Interfaces:
    java.io.Serializable

    public final class Complex
    extends java.lang.Number
    See Also:
    Serialized Form
    • Field Detail

      • identity

        public static final Complex identity
    • Constructor Detail

      • Complex

        public Complex​(double real,
                       double imaginary)
      • Complex

        public Complex()
      • Complex

        public Complex​(double real)
      • Complex

        public Complex​(Complex other)
      • Complex

        public Complex​(Angle phi)
      • Complex

        public Complex​(double real,
                       Angle phi)
    • Method Detail

      • real

        public double real()
      • imaginary

        public double imaginary()
      • conjugate

        public Complex conjugate()
      • isReal

        public boolean isReal()
      • magnitude

        public double magnitude()
      • doubleValue

        public double doubleValue()
        Specified by:
        doubleValue in class java.lang.Number
      • floatValue

        public float floatValue()
        Specified by:
        floatValue in class java.lang.Number
      • longValue

        public long longValue()
        Specified by:
        longValue in class java.lang.Number
      • intValue

        public int intValue()
        Specified by:
        intValue in class java.lang.Number
      • angle

        public Angle angle()
      • add

        public Complex add​(double value)
      • subtract

        public Complex subtract​(double value)
      • multiply

        public Complex multiply​(double factor)
      • divide

        public Complex divide​(Complex fraction)
                       throws java.lang.IllegalStateException
        Throws:
        java.lang.IllegalStateException
      • tanh

        public static double tanh​(double value)
      • sinh

        public static double sinh​(double value)
      • cosh

        public static double cosh​(double value)
      • atanh

        public static double atanh​(double value)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object