Guest User

Untitled

a guest
Oct 23rd, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. def IsClose(value, target, threshold=0.02):
  2. result = (value / target)
  3. result = ((1 - threshold) <= result) and (result <= (1 + threshold))
  4. return result
Add Comment
Please, Sign In to add comment