Bounden describes points and regions within n-dimensional space.
The Point
class describes a point in n-dimensional space.
The class's generic type describes the coordinate type of each dimension, and must be specified as a tuple:
from bounden import Point
in_line = Point[tuple[int]]((0,))
in_rect = Point[tuple[int, int]]((0, 0))
in_cube = Point[tuple[int, int, int]]((0, 0, 0))
The position is read from the position
property:
from bounden import Point
point = Point[tuple[int, int, int]]((1, 2, 3))
print(point.position)
# (1, 2, 3)
Bounden requires Python 3.10 or later and can be installed from PyPI.
pip install bounden
Please raise bugs, feature requests and ask questions at cariad/bounden/issues.
Bounden is © 2022 Cariad Eccleston and released under the MIT License at cariad/nvalues.
Hello! 👋 I'm Cariad Eccleston and I'm a freelance backend and infrastructure engineer in the United Kingdom. You can find me at cariad.earth, github/cariad, linkedin/cariad and on Mastodon at @cariad@tech.lgbt.