This package provides 2D vector and rectangle classes. These classes were written to be used in games, so they have some methods that conveniently tie into pyglet and pygame, but for the most part they are quite general and could be used for almost anything.
Installation
The vecrec module is pure-python, dependency-free, and available from PyPI:
$ pip install vecrec
Basic Usage
Here are a few examples showing how to construct and use the Vector and Rect classes provided by this package:
>>> from vecrec import Vector, Rect >>> a = Vector(1, 2) >>> b = Vector(3, 4) >>> a + b Vector(4, 6)
Rectangles are more commonly constructed using factory methods:
>>> Rect.from_size(8, 11) Rect(0, 0, 8, 11) >>> Rect.from_center(a, 1, 1) Rect(0, 1, 1, 1)
Release files for vecrec 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vecrec-0.3.1.tar.gz | 18.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vecrec-0.3.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size:30.0 kB
Release files / vecrec-0.3.1.tar.gz
| Download URL | vecrec-0.3.1.tar.gz |
|---|---|
| Size | 18.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96ff0f833f5ab548f08e720b99998d3a86ac8ce4ba50ae9aa35936d3338cf97f
|
|
BLAKE2b-256 checksum How to use checksums |
336b30a71d137a7b39e2295e5b4dc858e177437bc5bdc1d04ab2c604ba63b6dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.25.1
|
Release files / vecrec-0.3.1-py2.py3-none-any.whl
| Download URL | vecrec-0.3.1-py2.py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
9d4725d304e6c696c84f1503c47d0c1a5a957f25cdaa8c8724d8d739c11136a2
|
|
BLAKE2b-256 checksum How to use checksums |
305f2270eac805b788674704ed30b3b0f6e036b71744ff498e7878ce636c1eb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.25.1
|