Remove old check_iteration
This commit is contained in:
parent
cc55ac1987
commit
6cb9a8cc40
17
main.py
17
main.py
@ -165,23 +165,6 @@ class Cross_painter(Widget):
|
||||
|
||||
# check whether a cross at pos interacts with cross
|
||||
def check_interaction(self,pos,cross):
|
||||
#if max(abs(pos[0]-cross.pos[0]),abs(pos[1]-cross.pos[1]))<=cross.size/2:
|
||||
# return False
|
||||
## find nearest point
|
||||
#if abs(pos[0]-cross.pos[0])>abs(pos[1]-cross.pos[1]):
|
||||
# nearest=(
|
||||
# pos[0]-cross.size*1.5*sgn(pos[0]-cross.pos[0]),
|
||||
# pos[1]-cross.size*0.5*sgn(pos[1]-cross.pos[1])
|
||||
# )
|
||||
#else:
|
||||
# nearest=(
|
||||
# pos[0]-cross.size*0.5*sgn(pos[0]-cross.pos[0]),
|
||||
# pos[1]-cross.size*1.5*sgn(pos[1]-cross.pos[1])
|
||||
# )
|
||||
#if cross_distx(nearest,cross.pos)<cross.size/2 or cross_disty(nearest,cross.pos)<cross.size/2:
|
||||
# return False
|
||||
## no problem
|
||||
#return True
|
||||
return int((pos[0]-cross.pos[0])/cross.size)**2+int((pos[1]-cross.pos[1])/cross.size)**2>=5
|
||||
|
||||
# cross
|
||||
|
Loading…
Reference in New Issue
Block a user