pbfy0 / visvis

Automatically exported from code.google.com/p/visvis
Other
0 stars 0 forks source link

Bug in subtractinging pointsets/points #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In "A-B" the bug occurs when A is a Pointset instance. You'd expect to get the 
vector from A to B, but you get minus that.

This is really a terrible bug and I'm very surprised that it was not detected 
earlier; I use Point and Pointset instanced a lot. Maybe because it occurs 
mostly when you calculate vectors (in which case you'd get the reverse vector). 
I must have assumed every time that I was missing a minus sign somewhere in my 
code.

I sincerely apologize to everyone who is affected by this.

Original issue reported on code.google.com by almar.klein@gmail.com on 6 Sep 2011 at 12:44

GoogleCodeExporter commented 9 years ago
I'll handle this one.

Original comment by almar.klein@gmail.com on 6 Sep 2011 at 12:44

GoogleCodeExporter commented 9 years ago
It would be unwise to simply solve this bug, because people (including myself) 
might have unintentionally worked around it by multiplying with -1 somewhere. 
Therefore I think its best to fix the bug, but display a warning message when 
the bug would otherwise have occurred, including a trace to show in what file 
it occurs. 

Further I implement a new Subtract() method that can be used to do subtraction 
without getting the error message. In a few versions we can remove the error 
message again.

Note that Point instances are unaffected, so this only applies to Pointset 
instances.

Original comment by almar.klein@gmail.com on 6 Sep 2011 at 2:09

GoogleCodeExporter commented 9 years ago
Unless you used pointset subtraction using a version of visvis below 1.6, you 
can ignore this issue.

Original comment by almar.klein@gmail.com on 16 Aug 2012 at 2:53

GoogleCodeExporter commented 9 years ago

Original comment by almar.klein@gmail.com on 26 Oct 2013 at 12:11