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.8.tar.gz
(3.7 kB
view details)
Built Distribution
File details
Details for the file melvec-0.0.8.tar.gz
.
File metadata
- Download URL: melvec-0.0.8.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 | 26bbdff253da4e1854e1f7990f6dcada2c03c892e436f576efcf77a975055940 |
|
MD5 | 1dda6c0a083d736557a532558abb86dc |
|
BLAKE2b-256 | 2efa040fe70614d62614e518f508e59ea22ddc6ab8caf0b4bdee10986f61523a |
File details
Details for the file melvec-0.0.8-py3-none-any.whl
.
File metadata
- Download URL: melvec-0.0.8-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 | 818f553d3dc531f894acdc69c1c1d7bb8a104c2d4e28b3b308872dfea0a36de9 |
|
MD5 | caf28b82c0c4db17837b2ffba0ebe38d |
|
BLAKE2b-256 | 27975193d9b0808f2533e4a32fd9171194d0ff46be6c1a33d09f7795ca7c4650 |