clean
This commit is contained in:
@@ -30,15 +30,15 @@ def isinGrid(pos,maxPos):
|
|||||||
return 0 <= pos[0] < maxPos[0] and 0 <= pos[1] < maxPos[1]
|
return 0 <= pos[0] < maxPos[0] and 0 <= pos[1] < maxPos[1]
|
||||||
|
|
||||||
def calcAntiNodes(posAntA, posAntB,maxPos):
|
def calcAntiNodes(posAntA, posAntB,maxPos):
|
||||||
AX = posAntA[0]
|
X1 = posAntA[0]
|
||||||
BX = posAntB[0]
|
X2 = posAntB[0]
|
||||||
AY = posAntA[1]
|
Y1 = posAntA[1]
|
||||||
BY = posAntB[1]
|
Y2 = posAntB[1]
|
||||||
CX = AX + (AX-BX)
|
X3 = X1 + (X1-X2)
|
||||||
CY = AY + (AY-BY)
|
Y3 = Y1 + (Y1-Y2)
|
||||||
|
|
||||||
if isinGrid ((CX,CY),maxPos):
|
if isinGrid ((X3,Y3),maxPos):
|
||||||
return (CX,CY)
|
return (X3,Y3)
|
||||||
return (-1,-1)
|
return (-1,-1)
|
||||||
|
|
||||||
def findAntiNodesA(maxPos,posAntennes):
|
def findAntiNodesA(maxPos,posAntennes):
|
||||||
|
|||||||
Reference in New Issue
Block a user