Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
:target: https://www.codacy.com
48 changes: 48 additions & 0 deletions test_noman.py
Original file line number Diff line number Diff line change
@@ -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