Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. public HashSet<BetterPoint> between(double rmin, double rmax)
  2. {
  3. HashSet<BetterPoint> result = new HashSet<BetterPoint>();
  4. BetterPoint pointI = null;
  5.  
  6. Iterator<BetterPoint> i = this.iterator();
  7. while(i.hasNext())
  8. {
  9. pointI = i.next();
  10. if(pointI.distance() <= rmax && pointI.distance() >= rmin)
  11. result.add(pointI);
  12. }
  13.  
  14. return result;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement