Skip to main content

It helps in solving vector algebra

Project description

Vector Algebra

It helps to create vector objects and manipulate them

Installation

pip install vector-algebra

How to use it ?

Create an instance of vector

from vector_algebra.Vectors import *

v1=Vectors(1,2,3)

v2=Vectors(1,2,1)

v3=v1+v2 --> for adding vectors

v4=v1-v2 --> for subtracting vectors

v5=v1*v2 --> returns a float value of dot product of two vectors

v6=v1**v2 --> returns a vector withcross product of both vectors

val=v1.magnitude() --> returns the magnitude of the vector

print(v1==v2) --> checks if both vectors are equal in direction and magnitude

print(v1>2) --> Checks if magnitude of v1 > v2

print(v1.angleBetweenVectorsInRadians(v2)) --> Returns angle between vectors in radians

print(v1.angleBetweenVectorsInDegrees(v2)) --> Returns angle between vectors in degrees

print(isParallel(v1,v2))

print(isPerpendicular(v1,v2))

print(v1.unit()) --> To print unit vector

print(v3)

License

© 2021 Deepak Kumar Dash

This repository is licensed under MIT license. see LICENSE for details

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

vector_algebra-1.0.5.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

vector_algebra-1.0.5-py3-none-any.whl (3.8 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