Fixed Overshoot at end

This commit is contained in:
2022-04-09 22:53:19 +02:00
parent 5ad442d8c3
commit acbbbc8d05

3
2D.py
View File

@@ -101,7 +101,7 @@ timelineStep = Width/totalTime
while True:
i = 0
lastTime = 0
while i <= len(meanTime):
while i < len(meanTime):
if(i == 0):
pygame.draw.circle(screen, (255,0,0), (WidthMiddle+ail[0], Height-ele[0]), Pixelsize)
pygame.draw.circle(screen, (255,0,0), (rud[0], Height-thr[0]), Pixelsize)
@@ -124,6 +124,7 @@ while True:
pygame.draw.rect(screen, (0,255,0), (0, Height, (int(time.time()*1000)-startTime)*timelineStep, 1))
pygame.display.flip()
i+=1
if i < len(meanTime):
lastTime += meanTime[i]
for e in pygame.event.get():