Skip to main content

A small vector library

Project description

melvec

A small vector library for python


Installation:

To install this package type pip install melvec in a console/terminal.

Usage:

To import the package in your code use: import melvec.
To create a 2D-Vector use: melvec.Vec2().
To create a 3D-Vector use: melvec.Vec3().

For easy access to the vector classes it is recommended import the classes directly with: from melvec import Vec2, Vec3.

Example code snippets:

Using import melvec:
import melvec
            
u = melvec.Vec2(10, 2)
v = melvec.Vec2(3, 3)  
w = u + v  # -> Vec(13, 5)

print(u.dot(w))  # -> 140
Using from melvec import Vec2, Vec3:
from melvec import Vec2, Vec3
            
u = Vec2(10, 2)
v = Vec2(3, 3)  
w = u + v  # -> Vec(13, 5)

print(u.dot(w))  # -> 140

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

melvec-0.0.10.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

melvec-0.0.10-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file melvec-0.0.10.tar.gz.

File metadata

  • Download URL: melvec-0.0.10.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for melvec-0.0.10.tar.gz
Algorithm Hash digest
SHA256 b50c9735171d82164efc9dc875b3cda63542f9a3382d1480247b7b16e4ddbd94
MD5 7433d857b5a4c4601247a16197cefb8d
BLAKE2b-256 42b114442f643fb515f62953744831e3db48f5e437ce704cd4e91a51f5f89513

See more details on using hashes here.

File details

Details for the file melvec-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: melvec-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for melvec-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 54947c71a00256fa150c2005e1a5bb04ee0dc42651591129b8670e07edef1708
MD5 f0c5cfda6b10993118f92a7078f7ab22
BLAKE2b-256 68eb74d41088a975c5f357ed6dc30fcfa7d4a5bbd4e7b0a996beb2b508141208

See more details on using hashes here.

Supported by

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