sonolus.py 0.10.1__py3-none-any.whl → 0.10.2__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.
Potentially problematic release.
This version of sonolus.py might be problematic. Click here for more details.
- sonolus/script/vec.py +2 -1
- {sonolus_py-0.10.1.dist-info → sonolus_py-0.10.2.dist-info}/METADATA +1 -1
- {sonolus_py-0.10.1.dist-info → sonolus_py-0.10.2.dist-info}/RECORD +6 -6
- {sonolus_py-0.10.1.dist-info → sonolus_py-0.10.2.dist-info}/WHEEL +0 -0
- {sonolus_py-0.10.1.dist-info → sonolus_py-0.10.2.dist-info}/entry_points.txt +0 -0
- {sonolus_py-0.10.1.dist-info → sonolus_py-0.10.2.dist-info}/licenses/LICENSE +0 -0
sonolus/script/vec.py
CHANGED
|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
from sonolus.script.array import Array
|
|
4
4
|
from sonolus.script.array_like import ArrayLike
|
|
5
|
+
from sonolus.script.debug import assert_true
|
|
5
6
|
from sonolus.script.internal.impl import perf_meta_fn
|
|
6
7
|
from sonolus.script.internal.math_impls import _atan2, _cos, _sin
|
|
7
8
|
from sonolus.script.num import Num
|
|
@@ -158,7 +159,7 @@ class Vec2(Record):
|
|
|
158
159
|
A new vector with magnitude 1.
|
|
159
160
|
"""
|
|
160
161
|
magnitude = (self.x**2 + self.y**2) ** 0.5
|
|
161
|
-
|
|
162
|
+
assert_true(magnitude != 0, "Cannot normalize a zero vector")
|
|
162
163
|
return Vec2._quick_construct(x=self.x / magnitude, y=self.y / magnitude)
|
|
163
164
|
|
|
164
165
|
@perf_meta_fn
|
|
@@ -67,7 +67,7 @@ sonolus/script/timing.py,sha256=DklMvuxcFg3MzXsecUo6Yhdk7pScOJ7STwXvAiTvLKM,3067
|
|
|
67
67
|
sonolus/script/transform.py,sha256=4aS7-NNzX0v9KMXZ4gIGOaU1Cd-ok7DO_OvIBca0mGU,21418
|
|
68
68
|
sonolus/script/ui.py,sha256=DYPGWIjHj1IFPxW1zaEuIUQx0b32FJPXtiwCvrtJ6oo,7528
|
|
69
69
|
sonolus/script/values.py,sha256=6iJG6h4IDlbcK8FH4GENSHOQc7C_7fCGa34wM80qToA,1629
|
|
70
|
-
sonolus/script/vec.py,sha256=
|
|
70
|
+
sonolus/script/vec.py,sha256=s-_lplwu6UIvNpxiJHi2y1sM58-3ot1v1knAGbTJzCA,8162
|
|
71
71
|
sonolus/script/internal/__init__.py,sha256=T6rzLoiOUaiSQtaHMZ88SNO-ijSjSSv33TKtUwu-Ms8,136
|
|
72
72
|
sonolus/script/internal/builtin_impls.py,sha256=tpNbaH6fLICd8TYj9Hf_wrPSWk3RkhmSPVN9nqOuqj4,13372
|
|
73
73
|
sonolus/script/internal/callbacks.py,sha256=vWzJG8uiJoEtsNnbeZPqOHogCwoLpz2D1MnHY2wVV8s,2801
|
|
@@ -87,8 +87,8 @@ sonolus/script/internal/simulation_context.py,sha256=LGxLTvxbqBIhoe1R-SfwGajNIDw
|
|
|
87
87
|
sonolus/script/internal/transient.py,sha256=y2AWABqF1aoaP6H4_2u4MMpNioC4OsZQCtPyNI0txqo,1634
|
|
88
88
|
sonolus/script/internal/tuple_impl.py,sha256=DPNdmmRmupU8Ah4_XKq6-PdT336l4nt15_uCJKQGkkk,3587
|
|
89
89
|
sonolus/script/internal/value.py,sha256=OngrCdmY_h6mV2Zgwqhuo4eYFad0kTk6263UAxctZcY,6963
|
|
90
|
-
sonolus_py-0.10.
|
|
91
|
-
sonolus_py-0.10.
|
|
92
|
-
sonolus_py-0.10.
|
|
93
|
-
sonolus_py-0.10.
|
|
94
|
-
sonolus_py-0.10.
|
|
90
|
+
sonolus_py-0.10.2.dist-info/METADATA,sha256=07hKS146L3Ck4bScU9kbuWDHtIrExXvCIlygmvfxCbE,554
|
|
91
|
+
sonolus_py-0.10.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
92
|
+
sonolus_py-0.10.2.dist-info/entry_points.txt,sha256=oTYspY_b7SA8TptEMTDxh4-Aj-ZVPnYC9f1lqH6s9G4,54
|
|
93
|
+
sonolus_py-0.10.2.dist-info/licenses/LICENSE,sha256=JEKpqVhQYfEc7zg3Mj462sKbKYmO1K7WmvX1qvg9IJk,1067
|
|
94
|
+
sonolus_py-0.10.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|