Guest User

Untitled

a guest
Feb 21st, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. def normalize_interval(a, b):
  2. if a <= b: return (a, b)
  3. else: return (a, a)
  4.  
  5. # good version
  6. def intersect(oth):
  7. return interval(normalize_interval(min(self.hi, oth,hi), max(self.low, oth.low)))
Add Comment
Please, Sign In to add comment