Arithmetic/Complex: Difference between revisions
Content added Content deleted
(→{{header|Perl 6}}: add conjugate) |
(→{{header|Java}}: Add conjugate) |
||
Line 1,274: | Line 1,274: | ||
public Complex neg(){ |
public Complex neg(){ |
||
return new Complex(-real, -imag); |
return new Complex(-real, -imag); |
||
} |
|||
public Complex conj(){ |
|||
return new Complex(real, -imag); |
|||
} |
} |
||
Line 1,287: | Line 1,291: | ||
System.out.println(a.inv()); |
System.out.println(a.inv()); |
||
System.out.println(a.mult(b)); |
System.out.println(a.mult(b)); |
||
System.out.println(a.conj()); |
|||
} |
} |
||
}</lang> |
}</lang> |