Hexagonal
hexagonal provides hexagonal vectors.
Usage
>>> import hexagonal
Create a vector from cube coordinates, with x + y + z = 0. x is south-east-ish, y is north and z is south-west-ish.
>>> v = hexagonal.Vec(x=4, y=3, z=-7)
>>> v
Vec(4, 3, -7)
Coordinates can be accessed, but not modified. hexagonal.Vec is
immutable.
>>> v.x
4
>>> v.y
3
>>> v.z
-7
The z coordinate is optional.
>>> u = hexagonal.Vec(4, 5)
Arithmetic is supported.
>>> v + u
Vec(8, 8, -16)
>>> v - u
Vec(0, -2, 2)
abs gives the hexagonal distance to the vector, i.e. the radius of the
hexagon on which it sits.
>>> abs(u)
9
Metadata
Release files for hexagonal 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hexagonal-0.0.3.tar.gz | 16.1 kB | Without provenance | Details for hexagonal-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hexagonal-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for hexagonal-0.0.3-py3-none-any.whl |
Total release size: 31.4 kB
Release files / hexagonal-0.0.3.tar.gz
| Download URL | hexagonal-0.0.3.tar.gz |
|---|---|
| Size | 16.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
622bebca9a39f7f83adb32182a83900763017021b89fe747e07a6ef97b057120
|
|
BLAKE2b-256 checksum How to use checksums |
8238394f9bf4506d73269b7dafd780bc671bc3c7af62454bfde6d297ee12eff9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.8.3 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.5
|
Release files / hexagonal-0.0.3-py3-none-any.whl
| Download URL | hexagonal-0.0.3-py3-none-any.whl |
|---|---|
| Size | 15.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ddaafe2dfdf401f824ac0fc83b8c50bb0aef844542b1fac173bee37948f7ccf
|
|
BLAKE2b-256 checksum How to use checksums |
1c50bcf3c35a8c6d1de1aba7d42205c41a7ece1cd7d613db7da8608d5be266b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.8.3 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.5
|
Security for hexagonal 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.