e2D 1.1.0__py3-none-any.whl → 1.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- e2D/__init__.py +9 -12
- {e2D-1.1.0.dist-info → e2D-1.1.1.dist-info}/METADATA +1 -1
- e2D-1.1.1.dist-info/RECORD +8 -0
- e2D-1.1.0.dist-info/RECORD +0 -8
- {e2D-1.1.0.dist-info → e2D-1.1.1.dist-info}/LICENSE +0 -0
- {e2D-1.1.0.dist-info → e2D-1.1.1.dist-info}/WHEEL +0 -0
- {e2D-1.1.0.dist-info → e2D-1.1.1.dist-info}/top_level.txt +0 -0
e2D/__init__.py
CHANGED
|
@@ -722,18 +722,6 @@ class Vector2D:
|
|
|
722
722
|
sin_angle = _mt.sin(angle)
|
|
723
723
|
return Vector2D(translated.x * cos_angle - translated.y * sin_angle, translated.x * sin_angle + translated.y * cos_angle) + center
|
|
724
724
|
|
|
725
|
-
def __eq__(self, other:"float|int|Vector2D|V2|list|tuple") -> bool:
|
|
726
|
-
other = self.__normalize__(other)
|
|
727
|
-
return self.x == other.x and self.y == other.y
|
|
728
|
-
|
|
729
|
-
def __ne__(self, other:"float|int|Vector2D|V2|list|tuple") -> bool:
|
|
730
|
-
return not self.__eq__(other)
|
|
731
|
-
|
|
732
|
-
#######################################################################################################################################
|
|
733
|
-
#######################################################################################################################################
|
|
734
|
-
#######################################################################################################################################
|
|
735
|
-
#######################################################################################################################################
|
|
736
|
-
|
|
737
725
|
def no_zero_div_error(self:"Vector2D|V2", n:"int|float|Vector2D|V2", error_mode:str="zero") -> "Vector2D|V2":
|
|
738
726
|
"""
|
|
739
727
|
# Handle division between the Vector2D other and a numeric value or another Vector2D other.
|
|
@@ -843,6 +831,15 @@ class Vector2D:
|
|
|
843
831
|
self.y /= other.y
|
|
844
832
|
return self
|
|
845
833
|
|
|
834
|
+
def __eq__(self, other) -> bool:
|
|
835
|
+
if not isinstance(other, Vector2D|V2|list|tuple):
|
|
836
|
+
return False
|
|
837
|
+
other = self.__normalize__(other)
|
|
838
|
+
return self.x == other.x and self.y == other.y
|
|
839
|
+
|
|
840
|
+
def __ne__(self, other) -> bool:
|
|
841
|
+
return not self.__eq__(other)
|
|
842
|
+
|
|
846
843
|
def __abs__(self:"V2|Vector2D") -> "Vector2D|V2":
|
|
847
844
|
return Vector2D(abs(self.x), abs(self.y))
|
|
848
845
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: e2D
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.1
|
|
4
4
|
Summary: Python library for 2D games. Streamlines dev with keyboard/mouse input, vector calculations, color manipulation, and collision detection. Simplify game creation and unleash creativity!
|
|
5
5
|
Home-page: https://github.com/marick-py/e2D
|
|
6
6
|
Author: Riccardo Mariani
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
e2D/__init__.py,sha256=tPNOewvMALxc82-wfNuWPJqEedKWbz_Kcs30dAfZhs0,58532
|
|
2
|
+
e2D/envs.py,sha256=pNhLyLn6pwkj4_Atbv-_lbg31Tdx2whesEQQjZqpsUw,10261
|
|
3
|
+
e2D/utils.py,sha256=Sm8ZRpjzFDONCoupZIJQWmQvb068pbbzKWrgl_hAU_4,5306
|
|
4
|
+
e2D-1.1.1.dist-info/LICENSE,sha256=aUMNoMOR0KnN_66VQK7pyjWLYEtkUbAVgo29elfCfYk,1087
|
|
5
|
+
e2D-1.1.1.dist-info/METADATA,sha256=B-EtTbp423lJvgQc5dX2WyLf77hTE04QwOAqro9BQL0,9550
|
|
6
|
+
e2D-1.1.1.dist-info/WHEEL,sha256=AtBG6SXL3KF_v0NxLf0ehyVOh0cold-JbJYXNGorC6Q,92
|
|
7
|
+
e2D-1.1.1.dist-info/top_level.txt,sha256=3vKZ-CGzNlTCpzVMmM0Ht76krCofKw7hZ0wBf-dnKdM,4
|
|
8
|
+
e2D-1.1.1.dist-info/RECORD,,
|
e2D-1.1.0.dist-info/RECORD
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
e2D/__init__.py,sha256=h2B0CkzN33YwY0o3bJYbYJ_hWtr9Lt87SPEQ6BwmAcY,59067
|
|
2
|
-
e2D/envs.py,sha256=pNhLyLn6pwkj4_Atbv-_lbg31Tdx2whesEQQjZqpsUw,10261
|
|
3
|
-
e2D/utils.py,sha256=Sm8ZRpjzFDONCoupZIJQWmQvb068pbbzKWrgl_hAU_4,5306
|
|
4
|
-
e2D-1.1.0.dist-info/LICENSE,sha256=aUMNoMOR0KnN_66VQK7pyjWLYEtkUbAVgo29elfCfYk,1087
|
|
5
|
-
e2D-1.1.0.dist-info/METADATA,sha256=yIjVktYAGRy8L4nSRp8DtmXM1DJgxahFat7d4v8-jv8,9550
|
|
6
|
-
e2D-1.1.0.dist-info/WHEEL,sha256=AtBG6SXL3KF_v0NxLf0ehyVOh0cold-JbJYXNGorC6Q,92
|
|
7
|
-
e2D-1.1.0.dist-info/top_level.txt,sha256=3vKZ-CGzNlTCpzVMmM0Ht76krCofKw7hZ0wBf-dnKdM,4
|
|
8
|
-
e2D-1.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|