Skip to content

Commit

Permalink
moved src repository
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderFL committed Nov 2, 2021
1 parent f4c1745 commit ebfe4a2
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
dist/
src/common_game_maths_alexfreyr.egg-info/
src/common_game_maths.egg-info/
common_game_maths/__pycache__/
common_game_maths.egg-info/
File renamed without changes.
7 changes: 5 additions & 2 deletions src/Point.py → common_game_maths/Point.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ def __add__(self, other):
return Point(self.x + other.x, self.y + other.y, self.z + other.z)

# Subtracts two points
def __sub__(self, other) -> Vector:
return Vector(self.x - other.x, self.y - other.y, self.z - other.z)
def __sub__(self, other):
return Vector(self.x - other.x, self.y - other.y, self.z - other.z)

def __str__(self):
return "Point(%s, %s, %s)" % (str(self.x), str(self.y), str(self.z))
5 changes: 4 additions & 1 deletion src/Vector.py → common_game_maths/Vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@ def dot(self, other):
return self.x * other.x + self.y * other.y + self.z * other.z

def cross(self, other):
return Vector(self.y * other.z - self.z * other.y, self.z * other.x - self.x * other.z, self.x * other.y - self.y * other.x)
return Vector(self.y * other.z - self.z * other.y, self.z * other.x - self.x * other.z, self.x * other.y - self.y * other.x)

def __str__(self):
return "Vector(%s, %s, %s)" % (str(self.x), str(self.y), str(self.z))
File renamed without changes.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
requires = [
"setuptools>42",
"setuptools>=42",
"wheel"
]
build-backend = "setuptools.build_meta"
9 changes: 2 additions & 7 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = common-game-maths
version = 1.0.0
version = 1.0.2
author = Alexander Freyr
author_email = alex@alexfreyr.com
description = A small package consisting of common math objects used in creating games
Expand All @@ -15,10 +15,5 @@ classifiers =
Operating System :: OS Independent

[options]
package_dir =
= src
packages = find:
python_requires >= 3.6

[options.packages.find]
where = s
python_requires = >= 3.6

0 comments on commit ebfe4a2

Please sign in to comment.