VectorLib: A library to create and manage vectors in Python.
Installation
python -m pip install vectorlib-py
# or
python -m pip install git+https://github.com/AaravMalani/vectorlib
Usage
import vectorlib
u = vectorlib.Vector(0, 10)
v = vectorlib.Vector(-10, 0, 3)
t = 4
a_avg = (v-u)/t
print(a_avg) # Vector(-2.5, -2.5, 0.75)
print(a_avg.magnitude) # 3.61420807370024
print(a_avg.dim) # (3,)
print(a_avg.direction) # Vector(-0.6917144638660746, -0.6917144638660746, 0.2075143391598224)
m = 4
f = m * a
print(f) # Vector(-10.0, -10.0, 3.0)
print(f.dot(a_avg)) # 52.25
print(f.cross(a_avg)) # Vector(0.0, 0.0, 0.0)
Release files for vectorlib-py 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vectorlib-py-1.0.2.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vectorlib_py-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.6 kB
Release files / vectorlib-py-1.0.2.tar.gz
| Download URL | vectorlib-py-1.0.2.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60603879604c4dc54eb98a0b2c330f09e57f0bd8f9be01ed741fedf6ed7eea8b
|
|
BLAKE2b-256 checksum How to use checksums |
5696704675b5c45900aa7a9f1d0a1b43015d05554cbb1c6ab37d661eaedbdc30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / vectorlib_py-1.0.2-py3-none-any.whl
| Download URL | vectorlib_py-1.0.2-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
360ec51617b5b8e597b8a57e1be754d6f2b801fcb96126a5875055eb43687715
|
|
BLAKE2b-256 checksum How to use checksums |
2d81282deac8cf9f9a95b487415da6f8f91e0402c16a58e9f5a9c315acf90232
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|