This commit is contained in:
沈瑗杰 2020-12-23 23:10:17 +08:00
parent f184a8a0ff
commit 55aab79f55
4 changed files with 4 additions and 4 deletions

View File

@ -12,6 +12,6 @@
} }
}, },
"basic_number": { "basic_number": {
"G" : ["6.67", "-11", ["N", "m", "m"], ["kg", "kg"]] "G" : [6.67, -11, ["N", "m", "m"], ["kg", "kg"]]
} }
} }

View File

@ -15,7 +15,7 @@ class Orbit_demo(threading.Thread):
# father class __init__() # father class __init__()
threading.Thread.__init__(self) threading.Thread.__init__(self)
# dic # dic
self.ship_info = {} self.ship_info = {"mass": [1, 5, ["kg"], []],}
self.planet_system = {"Solar System": {"planets": {"smearth": {"description": "", "gravity": 9.81, "radius": 63710000, "map_color": [103, 157, 255]}}}} self.planet_system = {"Solar System": {"planets": {"smearth": {"description": "", "gravity": 9.81, "radius": 63710000, "map_color": [103, 157, 255]}}}}
self.main_ship_parts = {} self.main_ship_parts = {}
self.this_planet_info = {} self.this_planet_info = {}

View File

@ -23,7 +23,7 @@ def S_N_M(A, B): # stand for Scientific notation multiple
""" """
formats: formats:
A & B list format:docs.basic_config.json:basic_number""" A & B list format:docs.basic_config.json:basic_number"""
C = [float(A[0] * B[0]), int(A[1] + B[1])] C = [A[0] * B[0], int(A[1] + B[1])]
S_C_float_check(C) S_C_float_check(C)
Unit1, Unit2 = A[2] + B[2], A[3] + B[3] Unit1, Unit2 = A[2] + B[2], A[3] + B[3]
if Unit1 == None: if Unit1 == None:

View File

@ -7,7 +7,7 @@ import libs
A = [2.573, 3, ["m", "kg"], ["N", "s"]] A = [2.573, 3, ["m", "kg"], ["N", "s"]]
B = [0.245, -7, ["N", "kg"], ["m", "s"]] B = [2.45, -7, ["N", "kg"], ["m", "s"]]
print("A = " , A) print("A = " , A)
print("B = " , B) print("B = " , B)