nakijun / aforge

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

Ranges IsInside logical error #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In DoubleRange.cs and IntegerRange.cs, I think the IsInside function is in
error; Don't really know how it affect the code and examples, I'm just
starting to look at it !

Original:
public bool IsInside( double x )
{
  return ( ( x >= min ) && ( x <= min ) ); // This looks like return x == min
}

Should be (?) :
  return ( ( x >= min ) && ( x <= max ) );

Original issue reported on code.google.com by martinmiller@gmail.com on 22 Jan 2007 at 2:14

GoogleCodeExporter commented 9 years ago
Ups. Mistyped. This method was not used yet in the library, so that is why the 
error 
was not spotted.

Original comment by andrew.k...@gmail.com on 22 Jan 2007 at 8:02

GoogleCodeExporter commented 9 years ago
Good !

Also, As was studying the code I'm not sure about the IsInside "definition" and 
IsOverlaping "definition"; I find them not as good as "intersect" and "subset", 
as 
used in Set theory ( http://en.wikipedia.org/wiki/Set )

But I'm just nitpicking ;-)

Original comment by martinmiller@gmail.com on 22 Jan 2007 at 2:35

GoogleCodeExporter commented 9 years ago

Original comment by andrew.k...@gmail.com on 26 Aug 2007 at 6:34

GoogleCodeExporter commented 9 years ago

Original comment by andrew.k...@gmail.com on 19 May 2008 at 6:08