Rectangle::contains() bugs?

these two versions use < and > in some comparisons:

but Rectangle::contains (Rectangle other) uses <= and >= everywhere.

this gives seemingly contradictory results:

  juce::Rectangle<float> a{0,0,10,10};
  juce::Rectangle<float> b{5,0,5,10};

  a.contains(b); // true
  a.contains(b.getTopLeft()); // true
  a.contains(b.getBottomLeft()); // false??
  a.contains(b.getTopRight()); // false??
  a.contains(b.getBottomRight()); // false??
1 Like