So basically I am writing an android app and I notice that the add function is not working properly. When I tried testing it with
Complex dummy = Complex.ZERO;
dummy.add(Complex.I);
Log.i("DEBUG", "DUMMY = " + dummy);
I get
I/DEBUG: DUMMY = (0.0, 0.0)
from Logcat. I can't seem to find what went wrong with such a simple function call.
This is the description of the function from Apache's website
public Complex add(Complex addend) throws NullArgumentException
Returns a Complex whose value is (this + addend). Uses the definitional formula (a + bi) + (c + di) = (a+c) + (b+d)i