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

Uploaded Source

Built Distribution

melvec-0.0.8-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

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