Skip to main content

A library to create and manage vectors in Python.

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vectorlib-py-1.0.2.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vectorlib_py-1.0.2-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file vectorlib-py-1.0.2.tar.gz.

File metadata

  • Download URL: vectorlib-py-1.0.2.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for vectorlib-py-1.0.2.tar.gz
Algorithm Hash digest
SHA256 60603879604c4dc54eb98a0b2c330f09e57f0bd8f9be01ed741fedf6ed7eea8b
MD5 eef00f9ea3443917edd5d660e9c3bf31
BLAKE2b-256 5696704675b5c45900aa7a9f1d0a1b43015d05554cbb1c6ab37d661eaedbdc30

See more details on using hashes here.

File details

Details for the file vectorlib_py-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: vectorlib_py-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for vectorlib_py-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 360ec51617b5b8e597b8a57e1be754d6f2b801fcb96126a5875055eb43687715
MD5 6b5cf05aaa06ee34d200a8fda03f1f87
BLAKE2b-256 2d81282deac8cf9f9a95b487415da6f8f91e0402c16a58e9f5a9c315acf90232

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page