feat: add raycasts

This commit is contained in:
2025-10-19 02:46:38 +02:00
parent 8ca15eaa78
commit 04ac674982
4 changed files with 87 additions and 7 deletions

View File

@@ -24,6 +24,9 @@ class Vec:
def __truediv__(self, value: float) -> Vec:
return Vec(self.x / value, self.y / value)
def __neg__(self) -> Vec:
return Vec(-self.x, -self.y)
def dot(self, other: Vec) -> float:
return self.x * other.x + self.y * other.y