From f53c07c6de0c89ac1fbee1edc23f7d01c9200244 Mon Sep 17 00:00:00 2001 From: nnoman-asif <122397862+nnoman-asif@users.noreply.github.com> Date: Fri, 24 Feb 2023 12:13:44 +0500 Subject: [PATCH 1/3] Add files via upload --- test_noman.py | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 test_noman.py diff --git a/test_noman.py b/test_noman.py new file mode 100644 index 0000000..100a9f0 --- /dev/null +++ b/test_noman.py @@ -0,0 +1,48 @@ +import pytest +from gem import matrix + + + + +def test_function(): + b=[[1.0, 0.0, 0.0, 0.0, 0.0], + [0.0, 1.0, 0.0, 0.0, 0.0], + [0.0, 0.0, 1.0, 0.0, 0.0], + [0.0, 0.0, 0.0, 1.0, 0.0], + [0.0, 0.0, 0.0, 0.0, 1.0]] + a=matrix.identity(5) + + assert matrix.transpose(a)==b +def test_function1(): + b=[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]] + a=matrix.identity(3) + + assert matrix.transpose(a)==b +def test_function2(): + b=[[1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], + [0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0], + [0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0], + [0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0], + [0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0], + [0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0], + [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0]] + a=matrix.identity(7) + + assert matrix.transpose(a)==b + + + + + +def test_function3(): + + a=matrix.identity(3) + + assert matrix.inverse3(a)==a +def test_function5(): + + a=matrix.identity(4) + + assert matrix.inverse4(a)==a + + \ No newline at end of file From 9639f3f32c4d0c271861af0dc9200a715e461496 Mon Sep 17 00:00:00 2001 From: nnoman-asif <122397862+nnoman-asif@users.noreply.github.com> Date: Fri, 24 Feb 2023 12:15:50 +0500 Subject: [PATCH 2/3] Update README.rst --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 8ec204a..433f759 100644 --- a/README.rst +++ b/README.rst @@ -3,7 +3,7 @@ pyGameMath |Build Status| |Code Health| |Codacy Badge| ====================================================== -| This is a math library written in python for 2D/3D game development +| This is a math library written in python for 2D/3D game development which is also compatible with pypy. I made it while I was learning more about the math used in graphics development and for personal use in OpenGL related projects. @@ -137,4 +137,4 @@ Legendre Polynomial (Experimental, not complete): .. |Code Health| image:: https://landscape.io/github/explosiveduck/pyGameMath/master/landscape.svg?style=flat :target: https://landscape.io/github/explosiveduck/pyGameMath/master .. |Codacy Badge| image:: https://api.codacy.com/project/badge/907e4230379f40a8bedcfc0a9a0ed43c - :target: https://www.codacy.com \ No newline at end of file + :target: https://www.codacy.com From 12bcd80546bf68c223cf28930249135805cb2dd2 Mon Sep 17 00:00:00 2001 From: nnoman-asif <122397862+nnoman-asif@users.noreply.github.com> Date: Mon, 17 Apr 2023 13:29:15 +0500 Subject: [PATCH 3/3] Update README.rst --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 433f759..4902ac1 100644 --- a/README.rst +++ b/README.rst @@ -3,7 +3,7 @@ pyGameMath |Build Status| |Code Health| |Codacy Badge| ====================================================== -| This is a math library written in python for 2D/3D game development +| This is a math library written in python for 2D/3D game development which is also compatible with pypy. I made it while I was learning more about the math used in graphics development and for personal use in OpenGL related projects.