Pi and deg2rad have to be defined if the script is imported too.
This commit is contained in:
parent
cc7685c458
commit
82bffd6caf
1 changed files with 6 additions and 3 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue