e2D 1.3.4__py3-none-any.whl → 1.3.6__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 CHANGED
@@ -15,8 +15,8 @@ DOUBLE_PI = PI*2
15
15
  #
16
16
 
17
17
  class Vector2D:
18
- round_values_on_print = False
19
- def __init__(self:"V2|Vector2D", x:int|float=0, y:int|float=0) -> None:
18
+ round_values_on_print :float= 1.0
19
+ def __init__(self:"V2|Vector2D", x:int|float=0.0, y:int|float=0.0) -> None:
20
20
  """
21
21
  # Initialize a 2D vector with the specified x and y components.
22
22
 
@@ -67,7 +67,7 @@ class Vector2D:
67
67
  self.x = x
68
68
  self.y = y
69
69
 
70
- def distance_to(self:"V2|Vector2D", other:"float|int|Vector2D|V2|list|tuple", squared:bool=True) -> int|float:
70
+ def distance_to(self:"V2|Vector2D", other:"float|int|Vector2D|V2|list|tuple", sqrd:bool=True) -> int|float:
71
71
  """
72
72
  # Calculate the distance between the current Vector2D other and another other.
73
73
 
@@ -103,7 +103,7 @@ class Vector2D:
103
103
  """
104
104
  other = self.__normalize__(other)
105
105
  d = (self.x - other.x)**2 + (self.y - other.y)**2
106
- return (d**(1/2) if squared else d)
106
+ return (d**(1/2) if sqrd else d)
107
107
 
108
108
  def angle_to(self:"V2|Vector2D", other:"float|int|Vector2D|V2|list|tuple") -> int|float:
109
109
  """
@@ -232,7 +232,7 @@ class Vector2D:
232
232
  """
233
233
  return Vector2D(self.x, self.y)
234
234
 
235
- def absolute_round(self:"V2|Vector2D", n=1) -> "Vector2D|V2":
235
+ def sign(self:"V2|Vector2D") -> "Vector2D|V2":
236
236
  """
237
237
  # Perform an "absolute round" operation on the Vector2D other.
238
238
 
@@ -271,14 +271,16 @@ class Vector2D:
271
271
  Note: The "absolute round" operation does not perform standard mathematical rounding; instead, it ensures the resulting
272
272
  vector points in the same direction as the original vector but has non-negative components.
273
273
  """
274
- s_abs = abs(self)
275
- return self.no_zero_div_error(s_abs, "zero") * n
274
+ return self.no_zero_div_error(abs(self), "zero")
276
275
 
277
276
  def floor(self:"V2|Vector2D", n:"int|float|Vector2D|V2"=1) -> "Vector2D|V2":
278
277
  return self.__floor__(n)
279
278
 
280
279
  def ceil(self:"V2|Vector2D", n:"int|float|Vector2D|V2"=1) -> "Vector2D|V2":
281
280
  return self.__ceil__(n)
281
+
282
+ def round(self:"V2|Vector2D", n:"int|float|Vector2D|V2"=1) -> "Vector2D|V2":
283
+ return self.__round__(n)
282
284
 
283
285
  def randomize(start:"int|float|Vector2D|V2|None"=None, end:"int|float|Vector2D|V2|None"=None) -> "Vector2D|V2": #type: ignore
284
286
  """
@@ -323,39 +325,7 @@ class Vector2D:
323
325
  if type(end) in int|float: end = Vector2D(end, end) #type: ignore
324
326
  elif type(end) == None: end = Vector2D(1,1)
325
327
  else: raise Exception(f"\nArg end must be in [Vector2D, int, float, tuple, list] not a [{type(end)}]\n")
326
- return start + Vector2D(_rnd.random(), _rnd.random()) * (end - start)
327
-
328
- def mid_point_to(self:"V2|Vector2D", *others) -> float:
329
- """
330
- # Calculate the midpoint between the current Vector2D other and one or more other Vector2D others.
331
-
332
- ## Parameters:
333
- *others (Vector2D): Variable number of Vector2D others representing other points.
334
-
335
- ## Returns:
336
- Vector2D: A new Vector2D other representing the midpoint.
337
-
338
- ## Example:
339
- point1 = Vector2D(1, 2)
340
-
341
- point2 = Vector2D(3, 4)
342
-
343
- mid_point = point1.mid_point_to(point2)
344
-
345
- print(mid_point.x, mid_point.y)
346
-
347
- This will print the midpoint between point1 and point2.
348
-
349
- ## Explanation:
350
- The function calculates the midpoint between the current Vector2D other (self)
351
- and one or more other Vector2D others (provided as *others).
352
-
353
- It first sums up all the Vector2D others (including self) and then divides the sum by
354
- the total number of points (len(others) + 1) to find the average point, which represents the midpoint.
355
-
356
- The result is returned as a new Vector2D other.
357
- """
358
- return sum(list(others) + [self]) / (len(others)+1)
328
+ return start + Vector2D(_rnd.random(), _rnd.random()) * (end - start) #type: ignore
359
329
 
360
330
  def dot_product(self, other:"float|int|Vector2D|V2|list|tuple") -> float:
361
331
  other = self.__normalize__(other)
@@ -382,30 +352,6 @@ class Vector2D:
382
352
  Example usage is shown in the "Example" section above.
383
353
  """
384
354
  return self.x * other.x + self.y * other.y
385
-
386
- def magnitude(self) -> float:
387
- """
388
- # Vector Magnitude (Length)
389
-
390
- ## Returns:
391
- float: The magnitude (length) of the vector.
392
-
393
- ## Example:
394
- v = Vector2D(3, 4)
395
- magnitude_v = v.magnitude() # Calculate the magnitude of the vector (3, 4)
396
- print(magnitude_v) # Output: 5.0
397
-
398
- ## Explanation:
399
- This method calculates the magnitude (length) of the vector.
400
- The magnitude of a 2D vector (x, y) is the square root of the sum of the squares of its components.
401
-
402
- The method uses the formula: magnitude = sqrt(x^2 + y^2).
403
-
404
- The resulting magnitude is returned as a floating-point value.
405
-
406
- Example usage is shown in the "Example" section above.
407
- """
408
- return (self.x ** 2 + self.y ** 2) ** .5
409
355
 
410
356
  def normalize(self) -> "Vector2D":
411
357
  """
@@ -435,7 +381,7 @@ class Vector2D:
435
381
 
436
382
  Example usage is shown in the "Example" section above.
437
383
  """
438
- mag = self.magnitude()
384
+ mag = self.length()
439
385
  if mag == 0:
440
386
  return self
441
387
  return Vector2D(self.x / mag, self.y / mag)
@@ -479,7 +425,7 @@ class Vector2D:
479
425
  """
480
426
  other = self.__normalize__(other)
481
427
  dot_product = self.dot_product(other)
482
- magnitude_product = other.magnitude() ** 2
428
+ magnitude_product = other.length() ** 2
483
429
  if magnitude_product == 0:
484
430
  raise ValueError("Cannot calculate projection for zero vectors.")
485
431
  return other * (dot_product / magnitude_product)
@@ -540,7 +486,7 @@ class Vector2D:
540
486
 
541
487
  Example usage is shown in the "Example" section above.
542
488
  """
543
- r = self.magnitude()
489
+ r = self.length()
544
490
  theta = _mt.atan2(self.y, self.x)
545
491
  return r, theta
546
492
 
@@ -581,7 +527,7 @@ class Vector2D:
581
527
  return cls(complex_n.real, complex_n.imag)
582
528
 
583
529
  def length(self) -> float:
584
- return V2z.distance_to(self)
530
+ return (self.x ** 2 + self.y ** 2) ** .5
585
531
 
586
532
  def lerp(self, other:"float|int|Vector2D|V2|list|tuple", t: float) -> "Vector2D|V2":
587
533
  """
@@ -652,13 +598,19 @@ class Vector2D:
652
598
 
653
599
  Example usage is shown in the "Example" section above.
654
600
  """
655
- if center is None:
656
- center = V2z
657
- else:
658
- center = self.__normalize__(center)
601
+ if center is None: center = V2z
602
+ else: center = self.__normalize__(center)
603
+ print(f"CENTER {center}")
659
604
  translated = self - center
605
+ print(f"TRANS {translated}")
660
606
  cos_angle = _mt.cos(angle)
607
+ print(f"COS {cos_angle}")
661
608
  sin_angle = _mt.sin(angle)
609
+ print(f"SIN {sin_angle}")
610
+ print(translated.x * cos_angle, translated.y * sin_angle, translated.x * cos_angle - translated.y * sin_angle)
611
+ data = Vector2D(translated.x * cos_angle - translated.y * sin_angle, translated.x * sin_angle + translated.y * cos_angle)
612
+ print(data.x, data.y, data)
613
+ print(data + center)
662
614
  return Vector2D(translated.x * cos_angle - translated.y * sin_angle, translated.x * sin_angle + translated.y * cos_angle) + center
663
615
 
664
616
  def no_zero_div_error(self:"Vector2D|V2", n:"int|float|Vector2D|V2", error_mode:str="zero") -> "Vector2D|V2":
@@ -710,7 +662,7 @@ class Vector2D:
710
662
  else:
711
663
  return self / n
712
664
  elif any(isinstance(n, cls) for cls in {Vector2D, V2}):
713
- return Vector2D((0 if error_mode == "zero" else (self.x if error_mode == "null" else _mt.nan)) if n.x == 0 else self.x / n.x, (0 if error_mode == "zero" else (self.y if error_mode == "null" else _mt.nan)) if n.y == 0 else self.y / n.y)
665
+ return Vector2D((0 if error_mode == "zero" else (self.x if error_mode == "null" else _mt.nan)) if n.x == 0 else self.x / n.x, (0 if error_mode == "zero" else (self.y if error_mode == "null" else _mt.nan)) if n.y == 0 else self.y / n.y) #type: ignore
714
666
  else:
715
667
  raise Exception(f"\nArg n must be in [Vector2D, int, float, tuple, list] not a [{type(n)}]\n")
716
668
 
@@ -723,10 +675,10 @@ class Vector2D:
723
675
  return Vector2D(max(self.x, other.x), max(self.y, other.y))
724
676
 
725
677
  def __str__(self:"V2|Vector2D") -> str:
726
- return f"{self.x:.02f}, {self.y:.02f}" if self.round_values_on_print else f"{self.x}, {self.y}"
678
+ return f"{self.x:{self.round_values_on_print}f}, {self.y:{self.round_values_on_print}f}"
727
679
 
728
680
  def __repr__(self:"V2|Vector2D") -> str:
729
- return f"x:{self.x:.02f}\ty:{self.y:.02f}" if self.round_values_on_print else f"x:{self.x}\ty:{self.y}"
681
+ return f"x:{self.x:{self.round_values_on_print}f}\ty:{self.y:{self.round_values_on_print}f}"
730
682
 
731
683
  def __call__(self:"V2|Vector2D", return_tuple=False) -> list|tuple:
732
684
  return (self.x, self.y) if return_tuple else [self.x, self.y]
@@ -832,9 +784,8 @@ class Vector2D:
832
784
 
833
785
  # comparasion
834
786
  def __eq__(self, other) -> bool:
835
- if not any(isinstance(other, cls) for cls in {Vector2D, V2, list, tuple}):
836
- return False
837
- other = self.__normalize__(other)
787
+ try: other = self.__normalize__(other)
788
+ except: return False
838
789
  return self.x == other.x and self.y == other.y
839
790
 
840
791
  def __ne__(self, other) -> bool:
@@ -904,7 +855,7 @@ class V2(Vector2D):
904
855
 
905
856
  V2inf = Vector2D(float('inf'), float('inf'))
906
857
  V2z = VectorZero = Vector2D()
907
- V2one = Vector2D(1, 1)
858
+ V2one = Vector2D(1.0, 1.0)
908
859
 
909
860
  def rgb(r:float, g:float, b:float) -> tuple[float, float, float]:
910
861
  return (r,g,b)
@@ -934,7 +885,7 @@ def color_lerp(current_c:list|tuple, final_c:list|tuple, step:int|float=.1) -> t
934
885
 
935
886
  This will calculate the color at an interpolation step of 0.5 between (255, 0, 0) and (0, 0, 255).
936
887
  """
937
- return tuple(c + (final_c[i] - c) * step for i,c in enumerate(current_c))
888
+ return tuple(c + (final_c[i] - c) * step for i,c in enumerate(current_c)) #type: ignore
938
889
 
939
890
  def color_fade(starting_c:list|tuple, final_c:list|tuple, index:int|float, max_index:int|float) -> tuple[float, float, float]:
940
891
  """
@@ -966,7 +917,7 @@ def color_fade(starting_c:list|tuple, final_c:list|tuple, index:int|float, max_i
966
917
 
967
918
  This will print the colors transitioning from (255, 0, 0) to (0, 0, 255).
968
919
  """
969
- return tuple((starting_c[i] - final_c[i]) / max_index * (max_index - index) + final_c[i] for i in range(3))
920
+ return tuple((starting_c[i] - final_c[i]) / max_index * (max_index - index) + final_c[i] for i in range(3)) #type: ignore
970
921
 
971
922
  def weighted_color_fade(colors_dict:dict) -> tuple[float, float, float]:
972
923
  """
@@ -998,49 +949,7 @@ def weighted_color_fade(colors_dict:dict) -> tuple[float, float, float]:
998
949
  weights = colors_dict.values()
999
950
 
1000
951
  if float("inf") in weights: return list(colors)[list(weights).index(float("inf"))]
1001
- return tuple(sum(n[i]*w for n,w in zip(colors, weights)) / sum(weights) for i in range(3))
1002
-
1003
- def angular_interpolation(starting_angle:int|float, final_angle:int|float, step:int|float=.1) -> float:
1004
- """
1005
- # Perform angular interpolation between two angles using the shortest distance.
1006
-
1007
- ## Parameters:
1008
- starting_angle (int or float): The initial angle in radians.
1009
- final_angle (int or float): The target angle in radians to interpolate towards.
1010
- step (int or float, optional): The step size for interpolation in radians. Default is 0.1.
1011
-
1012
- ## Returns:
1013
- float: The interpolated angle as a result of angular interpolation.
1014
-
1015
- ## Example:
1016
- starting_angle = 1.0
1017
-
1018
- final_angle = 5.0
1019
-
1020
- interpolated_angle = angular_interpolation(starting_angle, final_angle)
1021
-
1022
- print(f"Interpolated angle: {interpolated_angle}")
1023
-
1024
- This will print the interpolated angle using angular interpolation.
1025
-
1026
- ## Explanation:
1027
- The function calculates three distances between the `starting_angle` and the
1028
- `final_angle`. These distances represent possible angular interpolations:
1029
- 1. The direct interpolation from `starting_angle` to `final_angle`.
1030
- 2. The interpolation by taking a full circle (2 * pi) and then proceeding from
1031
- `starting_angle` to `final_angle`.
1032
- 3. The interpolation by taking a full circle (2 * pi) in the opposite direction
1033
- and then proceeding from `starting_angle` to `final_angle`.
1034
-
1035
- The function then chooses the shortest distance from the three options and returns
1036
- the interpolated angle obtained by multiplying the shortest distance by the `step`
1037
- value.
1038
-
1039
- The `step` parameter controls the granularity of interpolation. Smaller `step` values
1040
- provide more fine-grained interpolation but may require more iterations.
1041
- """
1042
- distances = (final_angle - starting_angle, final_angle - DOUBLE_PI - starting_angle, final_angle + DOUBLE_PI - starting_angle)
1043
- return min(distances, key=abs) * step
952
+ return tuple(sum(n[i]*w for n,w in zip(colors, weights)) / sum(weights) for i in range(3)) #type: ignore
1044
953
 
1045
954
  def color_distance(starting_c:list|tuple, final_c:list|tuple, sqrd:bool=True) -> float:
1046
955
  """
@@ -1084,6 +993,48 @@ def color_distance(starting_c:list|tuple, final_c:list|tuple, sqrd:bool=True) ->
1084
993
  distance = sum([(starting_c[i]-final_c[i])**2 for i in range(3)])
1085
994
  return (distance ** .5) if sqrd else distance
1086
995
 
996
+ def angular_interpolation(starting_angle:int|float, final_angle:int|float, step:int|float=.1) -> float:
997
+ """
998
+ # Perform angular interpolation between two angles using the shortest distance.
999
+
1000
+ ## Parameters:
1001
+ starting_angle (int or float): The initial angle in radians.
1002
+ final_angle (int or float): The target angle in radians to interpolate towards.
1003
+ step (int or float, optional): The step size for interpolation in radians. Default is 0.1.
1004
+
1005
+ ## Returns:
1006
+ float: The interpolated angle as a result of angular interpolation.
1007
+
1008
+ ## Example:
1009
+ starting_angle = 1.0
1010
+
1011
+ final_angle = 5.0
1012
+
1013
+ interpolated_angle = angular_interpolation(starting_angle, final_angle)
1014
+
1015
+ print(f"Interpolated angle: {interpolated_angle}")
1016
+
1017
+ This will print the interpolated angle using angular interpolation.
1018
+
1019
+ ## Explanation:
1020
+ The function calculates three distances between the `starting_angle` and the
1021
+ `final_angle`. These distances represent possible angular interpolations:
1022
+ 1. The direct interpolation from `starting_angle` to `final_angle`.
1023
+ 2. The interpolation by taking a full circle (2 * pi) and then proceeding from
1024
+ `starting_angle` to `final_angle`.
1025
+ 3. The interpolation by taking a full circle (2 * pi) in the opposite direction
1026
+ and then proceeding from `starting_angle` to `final_angle`.
1027
+
1028
+ The function then chooses the shortest distance from the three options and returns
1029
+ the interpolated angle obtained by multiplying the shortest distance by the `step`
1030
+ value.
1031
+
1032
+ The `step` parameter controls the granularity of interpolation. Smaller `step` values
1033
+ provide more fine-grained interpolation but may require more iterations.
1034
+ """
1035
+ distances = (final_angle - starting_angle, final_angle - DOUBLE_PI - starting_angle, final_angle + DOUBLE_PI - starting_angle)
1036
+ return min(distances, key=abs) * step
1037
+
1087
1038
  def avg_position(*others:"Vector2D|V2") -> Vector2D|V2:
1088
1039
  """
1089
1040
  # Calculate the average position for a variable number of Vector2D others.
e2D/plots.py CHANGED
@@ -13,6 +13,7 @@ class Function:
13
13
  self.plot : Plot
14
14
  self.color = color
15
15
  self.function = function
16
+ self.__layer_surface__ :pg.Surface= None #type: ignore
16
17
 
17
18
  def update_points(self) -> None:
18
19
  self.update_function(self.function)
@@ -82,7 +83,7 @@ class Function:
82
83
  class __PlotSettings__:
83
84
  def __init__(self, plot:Plot) -> None:
84
85
  self.plot = plot
85
- self.settings :dict[str: bool|V2|Vector2D|int|float]= {
86
+ self.settings :dict= {
86
87
  "use_real_time_rendering" : True,
87
88
  "show_corners_coords" : True,
88
89
 
@@ -110,8 +111,9 @@ class __PlotSettings__:
110
111
  def print_current_settings(self) -> None:
111
112
  longest_key = max(map(len, self.settings))
112
113
  longest_type = max(map(lambda setting: len(str(type(setting)).split("'")[1]), self.settings.values()))
114
+ split_string = '"'
113
115
  for setting in self.settings:
114
- print(f"{setting}{' '*(longest_key-len(setting))} :{str(type(self.settings[setting])).split("'")[1]}{' '*(longest_type-len(str(type(self.settings[setting])).split("'")[1]))}=\t{self.settings[setting]}")
116
+ print(f"{setting}{' '*(longest_key-len(setting))} :{str(type(self.settings[setting])).split(split_string)[1]}{' '*(longest_type-len(str(type(self.settings[setting])).split(split_string)[1]))}=\t{self.settings[setting]}")
115
117
 
116
118
  def set(self, key:str, new_value) -> None:
117
119
  if not (key in self.settings): raise ValueError(f"The key [{key}] does not exist...")
@@ -124,7 +126,7 @@ class __PlotSettings__:
124
126
  def get(self, key:str) -> bool|V2|Vector2D|int|float:
125
127
  return self.settings[key]
126
128
 
127
- def multiple_set(self, keys:list[str]) -> list[bool|V2|Vector2D|int|float]:
129
+ def multiple_get(self, keys:list[str]) -> list[bool|V2|Vector2D|int|float]:
128
130
  return [self.get(key) for key in keys]
129
131
 
130
132
  class Plot:
@@ -182,19 +184,19 @@ class Plot:
182
184
  return (real_position - self.position) * (self.bottom_right_plot_coord - self.top_left_plot_coord) / self.size + self.top_left_plot_coord
183
185
 
184
186
  def render(self) -> None:
185
- self.canvas.fill(self.settings.get("bg_color"))
187
+ self.canvas.fill(self.settings.get("bg_color")) #type: ignore
186
188
  if self.top_left_x < 0 < self.bottom_right_x:
187
189
  pg.draw.line(self.canvas,
188
- self.settings.get("axes_default_color") if (x_color:=self.settings.get("x_axis_color"))==None else x_color,
190
+ self.settings.get("axes_default_color") if (x_color:=self.settings.get("x_axis_color"))==None else x_color, #type: ignore
189
191
  self.__plot2real__(V2(0, self.top_left_y))(),
190
192
  self.__plot2real__(V2(0, self.bottom_right_y))(),
191
- self.settings.get("axes_default_width") if (x_width:=self.settings.get("x_axis_width"))==None else x_width)
193
+ self.settings.get("axes_default_width") if (x_width:=self.settings.get("x_axis_width"))==None else x_width) #type: ignore
192
194
  if self.bottom_right_y < 0 < self.top_left_y:
193
195
  pg.draw.line(self.canvas,
194
- self.settings.get("axes_default_color") if (y_color:=self.settings.get("y_axis_color"))==None else y_color,
196
+ self.settings.get("axes_default_color") if (y_color:=self.settings.get("y_axis_color"))==None else y_color, #type: ignore
195
197
  self.__plot2real__(V2(self.top_left_x, 0))(),
196
198
  self.__plot2real__(V2(self.bottom_right_x, 0))(),
197
- self.settings.get("axes_default_width") if (y_width:=self.settings.get("y_axis_width"))==None else y_width)
199
+ self.settings.get("axes_default_width") if (y_width:=self.settings.get("y_axis_width"))==None else y_width) #type: ignore
198
200
 
199
201
  for function in self.functions: function.draw()
200
202
 
@@ -232,7 +234,7 @@ class Plot:
232
234
  if event.type == pg.MOUSEWHEEL:
233
235
 
234
236
  range_n = self.settings.get("distance_to_axis_for_scalar_zoom")
235
- scalar = V2(0 if abs(self.plot_center_real_position.x - self.rootEnv.mouse.position.x) < range_n else 1, 0 if abs(self.plot_center_real_position.y - self.rootEnv.mouse.position.y) < range_n else 1)
237
+ scalar = V2(0 if abs(self.plot_center_real_position.x - self.rootEnv.mouse.position.x) < range_n else 1, 0 if abs(self.plot_center_real_position.y - self.rootEnv.mouse.position.y) < range_n else 1) #type: ignore
236
238
  self.current_zoom += event.y * scalar
237
239
 
238
240
  self.update_grid(True)
@@ -259,14 +261,14 @@ class Plot:
259
261
  def draw(self) -> None:
260
262
  self.rootEnv.screen.blit(self.canvas, self.position())
261
263
  if self.is_mouse_in_rect and self.settings.get("show_cursor_coords"):
262
- self.rootEnv.print(str(round(self.plot_mouse_position, .1)), self.rootEnv.mouse.position, fixed_sides=TEXT_FIXED_SIDES_BOTTOM_MIDDLE)
264
+ self.rootEnv.print(str(round(self.plot_mouse_position, .1)), self.rootEnv.mouse.position, fixed_sides=TEXT_FIXED_SIDES_BOTTOM_MIDDLE) #type: ignore
263
265
 
264
266
  data = [
265
267
  [f"ZOOM:", TEXT_FIXED_SIDES_TOP_LEFT, self.settings.get("show_zoom_info")],
266
- [f" x: {self.current_zoom.x:.{self.settings.get("info_precision")}f};", TEXT_FIXED_SIDES_TOP_LEFT, self.settings.get("show_zoom_info")],
267
- [f" y: {self.current_zoom.y:.{self.settings.get("info_precision")}f};", TEXT_FIXED_SIDES_TOP_LEFT, self.settings.get("show_zoom_info")],
268
+ [f" x: {self.current_zoom.x:.{self.settings.get('info_precision')}f};", TEXT_FIXED_SIDES_TOP_LEFT, self.settings.get("show_zoom_info")],
269
+ [f" y: {self.current_zoom.y:.{self.settings.get('info_precision')}f};", TEXT_FIXED_SIDES_TOP_LEFT, self.settings.get("show_zoom_info")],
268
270
  ]
269
271
 
270
272
  for i, (d, fixed_side, show) in enumerate(data):
271
273
  if show:
272
- self.rootEnv.print(d, self.settings.get("top_left_info_position") + self.settings.get("info_spacing") * i, fixed_sides=fixed_side)
274
+ self.rootEnv.print(d, self.settings.get("top_left_info_position") + self.settings.get("info_spacing") * i, fixed_sides=fixed_side) #type: ignore
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: e2D
3
- Version: 1.3.4
3
+ Version: 1.3.6
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,9 @@
1
+ e2D/__init__.py,sha256=7ew9vJekaWRt2oC3J7cqiKqHx0ya9pO-Em70UjlYYro,56780
2
+ e2D/envs.py,sha256=mhq3SI2EmckXp9h6RYKzTGSKkvzlH-SyMTBhl3yDVZU,3929
3
+ e2D/plots.py,sha256=leq6KUTaiIBQCYfn8ksOAd6Y8LKTbXutMDd9_SaCpJ4,15186
4
+ e2D/utils.py,sha256=sq9efoNnSlJAfjvf18qDQpvO1jyz-9-mWBW3P4WMkD4,5368
5
+ e2D-1.3.6.dist-info/LICENSE,sha256=wymkNVDvj3qmjdO_rAhkRPM4t5y3_SqffGsFdgfvznU,1066
6
+ e2D-1.3.6.dist-info/METADATA,sha256=-PcdAlDeFBdLOTjztw1DCVwcrLJwrFQDczcfx86x83k,9608
7
+ e2D-1.3.6.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
8
+ e2D-1.3.6.dist-info/top_level.txt,sha256=3vKZ-CGzNlTCpzVMmM0Ht76krCofKw7hZ0wBf-dnKdM,4
9
+ e2D-1.3.6.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- e2D/__init__.py,sha256=1aJPqvWfZmIB_Ti7RaPX7KrHULha3VQe_ulsowcNqO8,58309
2
- e2D/envs.py,sha256=mhq3SI2EmckXp9h6RYKzTGSKkvzlH-SyMTBhl3yDVZU,3929
3
- e2D/plots.py,sha256=9vEmtbLJWEDkZwEHEgo9_6H0PBpeKX4ulPnvSPpN0eo,14997
4
- e2D/utils.py,sha256=sq9efoNnSlJAfjvf18qDQpvO1jyz-9-mWBW3P4WMkD4,5368
5
- e2D-1.3.4.dist-info/LICENSE,sha256=wymkNVDvj3qmjdO_rAhkRPM4t5y3_SqffGsFdgfvznU,1066
6
- e2D-1.3.4.dist-info/METADATA,sha256=xdlbOBsa-MDr0b7PH-RXxZkrfdGaEtIBYsPON3IbJYQ,9608
7
- e2D-1.3.4.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
8
- e2D-1.3.4.dist-info/top_level.txt,sha256=3vKZ-CGzNlTCpzVMmM0Ht76krCofKw7hZ0wBf-dnKdM,4
9
- e2D-1.3.4.dist-info/RECORD,,
File without changes
File without changes