Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed contains bug

  • Loading branch information...
commit b465d57b8a9347aa63f113da8b392557a09786bd 1 parent bbf538b
@obviousjim obviousjim authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 ofRange.h
View
8 ofRange.h
@@ -1,8 +1,6 @@
/*
- * ofRange_<T>.h
- * SFEditor
*
- * Created by Jim on 1/15/11.
+ * Created by James George on 1/15/11.
* Templated by Christopher Baker on 6/27/12
*
*/
@@ -60,9 +58,11 @@ class ofRange_ {
}
bool intersects(const ofRange_<T>& rg){
- return contains(rg.min) || contains(rg.max);
+ bool intersects = this->contains(rg) || (min >= rg.min && max < rg.max) || contains(rg.min) || contains(rg.max);
+ return intersects;
}
+ //this is broken
ofRange_<T> getClamped(const ofRange_<T>& rg){
return contains(rg.min) || contains(rg.max);
}
Please sign in to comment.
Something went wrong with that request. Please try again.