Untitled

mail@pastecode.io avatar
unknown
java
2 years ago
279 B
2
Indexable
Never
    public void add(Complex c)
    {
        double r = this.real.doubleValue() + c.real.doubleValue();
        double i =  this.imaginary.doubleValue() + c.imaginary.doubleValue();

        this.real = (T) Double.valueOf(r);
        this.imaginary = (T) Double.valueOf(i);
    }