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
Release history Release notifications | RSS feed
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.7.tar.gz
(3.7 kB
view details)
Built Distribution
File details
Details for the file melvec-0.0.7.tar.gz
.
File metadata
- Download URL: melvec-0.0.7.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c5f87ef6c0a51a636aa6f019801012f5dc8ae2fec404aed5bb342a978f71ae8 |
|
MD5 | db61dcf03ac06e93f2e3526b6b4d81a3 |
|
BLAKE2b-256 | 79e7c748fe044f8ae14c592659f2b736ebb88d8ca0e4a984b6562dfd87cf26a6 |
File details
Details for the file melvec-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: melvec-0.0.7-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62d1ad24b2bd5bac844e118bb3da94c32ce42733a6cf6bb7b9681c384cdee5c1 |
|
MD5 | d0484969a1de5e1c11f558fa6db86c36 |
|
BLAKE2b-256 | 392f6484210794b74868e07522e12ae4fd36a01ef3291c2c5d34de68219423d6 |