Opencode gesagt er soll die Docstrings und Type hints noch ergänzen
This commit is contained in:
1 parent
a8901dae2f
commit
cb85e8b86c
4 files changed
+13
-14
No files matched your search
@@ -1,3 +1,5 @@
|
||||
"""Simulation eines um die Erde kreisenden Mondes mit pygame."""
|
||||
|
||||
import pygame
|
||||
|
||||
from compute import matmul, rot_2d, transpose
|
||||
@@ -25,9 +27,9 @@ class Moon(Game):
|
||||
"""Legt Startposition, Drehwinkel und Rotationsmatrix fest."""
|
||||
super().__init__(title, fps, size)
|
||||
self.position_moon: Point = (MOON_DISTANCE, 0.0) # relativ zur Erde
|
||||
self.theta = 0.01 # radian per frame
|
||||
self.rot_moon = rot_2d(self.theta, unit="rad")
|
||||
self.center = (size[0] // 2, size[1] // 2)
|
||||
self.theta: float = 0.01 # radian per frame
|
||||
self.rot_moon: list[list[float]] = rot_2d(self.theta, unit="rad")
|
||||
self.center: tuple[int, int] = (size[0] // 2, size[1] // 2)
|
||||
|
||||
@staticmethod
|
||||
def rotate(point: Point, rotation: list[list[float]]) -> Point:
|
||||
@@ -64,4 +66,4 @@ class Moon(Game):
|
||||
|
||||
if __name__ == "__main__":
|
||||
moon = Moon()
|
||||
moon.run()
|
||||
moon.run()
|
||||
Reference in new issue
Block a user