Skip to content

Commit

Permalink
version 1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
yoyoberenguer authored Oct 6, 2022
1 parent 36508dc commit 264b38a
Show file tree
Hide file tree
Showing 24 changed files with 2,654 additions and 1,214 deletions.
Binary file added ElasticCollision/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file added ElasticCollision/c_game.cp310-win_amd64.pyd
Binary file not shown.
Binary file added ElasticCollision/c_game.cp36-win_amd64.pyd
Binary file not shown.
Binary file added ElasticCollision/c_game.cp37-win_amd64.pyd
Binary file not shown.
Binary file added ElasticCollision/c_game.cp38-win_amd64.pyd
Binary file not shown.
Binary file added ElasticCollision/c_game.cp39-win_amd64.pyd
Binary file not shown.
Binary file added ElasticCollision/ec_game.cp310-win_amd64.pyd
Binary file not shown.
Binary file added ElasticCollision/ec_game.cp36-win_amd64.pyd
Binary file not shown.
Binary file added ElasticCollision/ec_game.cp37-win_amd64.pyd
Binary file not shown.
Binary file added ElasticCollision/ec_game.cp38-win_amd64.pyd
Binary file not shown.
Binary file added ElasticCollision/ec_game.cp39-win_amd64.pyd
Binary file not shown.
Binary file added ElasticCollision/ec_real.cp310-win_amd64.pyd
Binary file not shown.
Binary file added ElasticCollision/ec_real.cp36-win_amd64.pyd
Binary file not shown.
Binary file added ElasticCollision/ec_real.cp37-win_amd64.pyd
Binary file not shown.
Binary file added ElasticCollision/ec_real.cp38-win_amd64.pyd
Binary file not shown.
Binary file added ElasticCollision/ec_real.cp39-win_amd64.pyd
Binary file not shown.
1,875 changes: 986 additions & 889 deletions ElasticCollision/game/ec_game.c

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion ElasticCollision/game/ec_game.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ SOFTWARE.
"""


import warnings

warnings.filterwarnings("ignore", category=FutureWarning)
Expand Down Expand Up @@ -79,7 +80,7 @@ cdef extern from '../Source/vector.c':
DEF M_PI = 3.14159265358979323846
DEF M_PI2 = (3.14159265358979323846 / 2.0)

__version__ = "1.0.1"
__version__ = "1.0.5"

# **************************** PYTHON INTERFACE ***************************************

Expand Down
716 changes: 412 additions & 304 deletions ElasticCollision/real/ec_real.c

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions ElasticCollision/real/ec_real.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ cdef extern from '../Source/vector.c':
DEF M_PI = 3.14159265358979323846
DEF M_PI2 = 3.14159265358979323846 / 2.0

__version__ = "1.0.5"

# **************************** PYTHON INTERFACE ***************************************

@cython.boundscheck(False)
Expand Down
24 changes: 12 additions & 12 deletions ElasticCollision/tests/test_ec_game.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class TestMomentumTrigonometry(unittest.TestCase):
"""

# pylint: disable=too-many-statements
def run_test(self) -> None:
def runTest(self) -> None:
"""
:return: void
Expand Down Expand Up @@ -115,7 +115,7 @@ class TestAngleFree(unittest.TestCase):
"""

# pylint: disable=too-many-statements
def run_test(self) -> None:
def runTest(self) -> None:
"""
:return: void
Expand Down Expand Up @@ -194,7 +194,7 @@ class TestGetMomentumTrigonometry_v1v2(unittest.TestCase):
Test Momentum Angle free momentum_angle_free
"""

def run_test(self) -> None:
def runTest(self) -> None:
"""
RETURN VECTORS V1 & V2 OF ORIGINAL OBJECTS AFTER COLLISION
Expand Down Expand Up @@ -246,7 +246,7 @@ class TestGetV1(unittest.TestCase):
"""

def run_test(self) -> None:
def runTest(self) -> None:
"""
RETURN SCALAR SIZE V1 OF THE ORIGINAL OBJECT REPRESENTED BY (V1, THETA1, M1)
:return: void
Expand Down Expand Up @@ -294,7 +294,7 @@ class TestGetV2(unittest.TestCase):
"""

def run_test(self) -> None:
def runTest(self) -> None:
"""
RETURN SCALAR SIZE V2_ OF THE ORIGINAL OBJECT REPRESENTED BY (V2_, THETA2_, M2_)
Expand Down Expand Up @@ -344,7 +344,7 @@ class TestGetV1AngleFree(unittest.TestCase):
"""

def run_test(self) -> None:
def runTest(self) -> None:
"""
SCALAR SIZE V1_ OF THE ORIGINAL OBJECT SPEED REPRESENTED BY (V1_, M1_, X1 ARGUMENTS).
:return: void
Expand Down Expand Up @@ -384,7 +384,7 @@ class TestGetV2AngleFree(unittest.TestCase):
)nogil:
"""

def run_test(self) -> None:
def runTest(self) -> None:
"""
scalar size v2_ of the original object speed represented by (v2_, m2_, x2 arguments).
:return: void
Expand Down Expand Up @@ -423,7 +423,7 @@ class TestAngleFreeVec(unittest.TestCase):
vector2d x2
"""

def run_test(self) -> None:
def runTest(self) -> None:
"""
RETURN V1 & V2 angle free method
:return: void
Expand Down Expand Up @@ -466,7 +466,7 @@ class TestThetaAngle(unittest.TestCase):
Test get_theta_angle
"""

def run_test(self) -> None:
def runTest(self) -> None:
"""
RETURN THETA ANGLE Θ IN RADIANS [Π, -Π]
cdef inline float get_theta_angle(vector2d vector_)nogil
Expand Down Expand Up @@ -510,7 +510,7 @@ class TestGetContactAngle(unittest.TestCase):
Test get_contact_angle
"""

def run_test(self) -> None:
def runTest(self) -> None:
"""
RETURN THE CONTACT ANGLE Φ [Π, -Π] IN RADIANS BETWEEN OBJ1 AND OBJ2.
Expand Down Expand Up @@ -550,7 +550,7 @@ class TestMomentumAngleFreeC(unittest.TestCase):
Test momentum_angle_free_c (External C version)
"""

def run_test(self) -> None:
def runTest(self) -> None:
"""
RETURN VECTORS V1 & V2 AFTER OBJECT COLLISION (ANGLE FREE METHOD)
Expand Down Expand Up @@ -617,7 +617,7 @@ class TestMomentumTrigonometryC(unittest.TestCase):
Test momentum_trigonometry_c (External C version)
"""

def run_test(self) -> None:
def runTest(self) -> None:
"""
RETURN VECTORS V1 & V2 AFTER OBJECT COLLISION (TRIGONOMETRY)
Expand Down
4 changes: 2 additions & 2 deletions ElasticCollision/tests/test_ec_real.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class TestMomentumTrigonometryReal(unittest.TestCase):
Test Momentum Trigonometry momentum_trigonometry_real
"""
# pylint: disable=too-many-statements
def run_test(self) -> None:
def runTest(self) -> None:
"""
cpdef tuple momentum_trigonometry_real(
obj1_centre : Vector2,
Expand Down Expand Up @@ -113,7 +113,7 @@ class TestAngleFreeReal(unittest.TestCase):
"""

# pylint: disable=too-many-statements
def run_test(self) -> None:
def runTest(self) -> None:
"""
cpdef tuple momentum_angle_free_real(
obj1_vector : Vector2,
Expand Down
26 changes: 20 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

setuptools.setup(
name="ElasticCollision",
version="1.0.1", # Actual version on PyPI is 1.0.1
version="1.0.5", # Actual version on PyPI is 1.0.5, TEST is 1.0.13
author="Yoann Berenguer",
author_email="yoyoberenguer@hotmail.com",
description="ElasticCollision tools for pygame and arcade games ",
Expand All @@ -30,11 +30,14 @@
packages=['ElasticCollision'],
ext_modules=cythonize([
Extension("ElasticCollision.ec_game", ["ElasticCollision/game/ec_game.pyx"],
extra_compile_args=["/openmp", "/Qpar", "/fp:fast", "/O2", "/Oy", "/Ot"], language="c"),
extra_compile_args=["/openmp", "/Qpar", "/fp:fast", "/O2", "/Oy", "/Ot"],
language="c"),
Extension("ElasticCollision.c_game", ["ElasticCollision/game/c_game.pyx"],
extra_compile_args=["/openmp", "/Qpar", "/fp:fast", "/O2", "/Oy", "/Ot"], language="c"),
extra_compile_args=["/openmp", "/Qpar", "/fp:fast", "/O2", "/Oy", "/Ot"],
language="c"),
Extension("ElasticCollision.ec_real", ["ElasticCollision/real/ec_real.pyx"],
extra_compile_args=["/openmp", "/Qpar", "/fp:fast", "/O2", "/Oy", "/Ot"], language="c")]),
extra_compile_args=["/openmp", "/Qpar", "/fp:fast", "/O2", "/Oy", "/Ot"],
language="c")]),
include_dirs=[numpy.get_include()],
# define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")],
license='MIT',
Expand Down Expand Up @@ -84,14 +87,22 @@
'pyproject.toml',
'README.md',
'requirements.txt',
'simulation.py'
]),

('./lib/site-packages/ElasticCollision/game',
[
'ElasticCollision/game/__init__.py',
'ElasticCollision/game/ec_game.pyx',
'ElasticCollision/game/c_game.pyx',
'ElasticCollision/game/setup_ec_game.py',
'ElasticCollision/game/setup_ec_game.py'
]
),
('./lib/site-packages/ElasticCollision/real',
[
'ElasticCollision/real/__init__.py',
'ElasticCollision/real/ec_real.pyx',
'ElasticCollision/real/setup_ec_real.py'
]
),

Expand All @@ -102,7 +113,10 @@
'ElasticCollision/Assets/math3.png',
'ElasticCollision/Assets/math4.png',
'ElasticCollision/Assets/GameDomain.PNG',
'ElasticCollision/Assets/RealDomain.PNG'
'ElasticCollision/Assets/RealDomain.PNG',
'ElasticCollision/Assets/GameDomain_wrong_trajectory.PNG',


]),

('./lib/site-packages/ElasticCollision/tests',
Expand Down
Loading

0 comments on commit 264b38a

Please sign in to comment.