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.9.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: melvec-0.0.9.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.9.tar.gz
Algorithm Hash digest
SHA256 0252eeaddd2e33ecde9dc4f0aeb8cb3bcaff3d7bee70a7465c3d363b1a378df6
MD5 9f02a0fe23039416c9d85271b4ccca83
BLAKE2b-256 249a9b40fb68f168d146f4c3994da508b8ecb535756de6747eb199d0bd744a05

See more details on using hashes here.

File details

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

File metadata

  • Download URL: melvec-0.0.9-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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 2887875671373582ecae13d307f51cb5e19a9608983c65e8feaac700e4c9a1b5
MD5 840a9198677be63507a4b1d3a2fe0523
BLAKE2b-256 579e28139be93f1b9662f7fa232a5eafcc7a939ae4e6a84c0b147df7119a188e

See more details on using hashes here.

Supported by

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