Skip to main content

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)

Source distribution for vectorlib-py 1.0.2
File Size Uploaded
vectorlib-py-1.0.2.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vectorlib-py 1.0.2
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page