Skip to main content

Python Module to allow the use of Vectors

Project description

VectorsPY

Python module to use Vector2 and Vector3 (as in Unity Game Engine - C#) in Python.

  • Create Vector2 objects for 2D Vectors (x and y coordinate system)
  • Create Vector3 objects for 3D Vectors (x,y and z coordinate system)
  • Add, Subtract 2 Vectors
  • Get Magnitude of Vector Object
    and much more

Installation

Using pip -

pip install VectorsPY

General

VectorsPY has 2 Major classes

  • Vector2 For 2D Vectors
  • Vector3 For 3D Vectors

Usage

To create new 2D Vector use Vector2 class.

new2DVector = Vector2(x_value, y_value)

Similarly use Vector3 to create 3D Vector.

new3DVector = Vector3(x_value, y_value, z_value)

To create Vector from List, Tuple (iterables) use Miscellaneous function Vector. This will return a new Vector2 or Vector3 object based on iterable passed as argument.

iterable1 = [1,2] 
newVector1 = Vector(iterable1) #new Vector2 object from list

iterable2 = (4,5)
newVector2 = Vector(iterable2) #new Vector2 object from tuple


iterable3 = (3,4,5)
newVector3 = Vector(iterable3) #new Vector3 object from tuple

iterable4 = [3,4,5]
newVector4 = Vector(iterable4) #new Vector3 object from list


More Documentaion can be found on Github

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

VectorsPY-1.0.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

VectorsPY-1.0.0-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file VectorsPY-1.0.0.tar.gz.

File metadata

  • Download URL: VectorsPY-1.0.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.9.0rc1

File hashes

Hashes for VectorsPY-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9b3fb51995f4ab4bc2ec7dda774ebb0b41a3f4d56f49acd02b9119a5c95914a7
MD5 93894f1daacc92e11223546d9ac87668
BLAKE2b-256 b15bc5dcca1c7d3600f5b196254ee0ffb16b9ba3d549cb861eb60580ca447a98

See more details on using hashes here.

File details

Details for the file VectorsPY-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: VectorsPY-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.9.0rc1

File hashes

Hashes for VectorsPY-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4cdd73d11474fc88a27b9fca113a75832fbc1a8232d63517b584c2295b46a85a
MD5 ab4bc8c7f69a23f0bf296a4d836c55b9
BLAKE2b-256 17714ae52e4510f3d202e9edb6fa9af1179b9ba0ed6fef69292a0c65c3458a11

See more details on using hashes here.

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