diff --git a/physics/parabelfunc.py b/physics/parabelfunc.py index 5a38f84..7628362 100755 --- a/physics/parabelfunc.py +++ b/physics/parabelfunc.py @@ -7,6 +7,11 @@ from math import sin, cos, tan, sqrt from time import sleep +# pi is not defined by default +pi = 3.1416 +deg2rad = pi / 180 + + ######################################################################################## def berechneflugbahn(xmax, ymax, steps, startwinkel, startgeschwindigkeit, xmin=0, ymin=0, starthoehe=0, gravitation=9.81, xstep=1): x = 0 @@ -79,9 +84,7 @@ if __name__ == "__main__": cows = "🐵🐒🦍🦧🐕🐯🦝🐩🐅🐴🐎🦄🦌🐗🐂🐃🐄🐪🐫🦙🦒🐹🦘🦡🐧🕊️ 🦅🦆🦉🐍🦎🐊🦜🦚🦩🐲🐉🦕" cowlistlength = len(cows) cow = cows[random.randint(0, cowlistlength - 1)] - # pi is not defined by default - pi = 3.1416 - deg2rad = pi / 180 + # Needed: find our screensize. We are in textmode here termsize_xy = os.get_terminal_size()