-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
+(-1 - 1.i) return (1 +1.i) #9709
Comments
|
@naqvis That's how it works but I think |
Thanks @asterite. One question after change though: shouldn't it return a copy instead of returning |
It's a struct (a copy is naturally returned) and it's immutable so a copy is never necessary (if it were a class). |
@jhass Can't remember. |
Adding
+
in front of a complex number return a new complex with a positive value of the real and imaginary part.This is caused by the instance method Complex#+
In Ruby, Python and C++,
+(-1 - 1i)
return(-1 - 1i)
.The text was updated successfully, but these errors were encountered: