Commit b693186f authored by jordan.dalby's avatar jordan.dalby

+ Fixed an issue with a single negative imaginary

parent 852abf43
......@@ -66,6 +66,8 @@ public class Complex
if (this.imaginaryPart_ != 0) // if the imaginary part exists
{
s+= this.imaginaryPart_ < 0 && this.realPart_ == 0 ? "-" : ""; // if the imaginaryPart_ is negative, and the realPart_ is equal to 0, then append a minus to the start of the imaginary number
s+="j" + String.valueOf(Math.abs(this.imaginaryPart_)); // append the imaginary part with a j to the string
}
return s; // return the string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment