Basic vector lib with basic functions
Project description
Python basic vector
You can find the project here : https://framagit.org/PLOTFINDER/python-basic-vector
Vectors :
-
Vec2 ( float, float )
-
Attributes
- x ( get, set )
- y (get, set)
-
Methods
- div ( float ) -> Vec2
- mult ( float ) -> Vec2
- length () : returns the length of the vector
- normalize () : normalizes the vector
-
Class methods
- dist( Vec2, Vec2) : returns the distance between two 2D vectors
- degreesToVec2 ( float ): converts degrees to Vec2 and returns the result
- radiansToVec2 ( float ): converts radians to Vec2 and returns the result
- lerp ( Vec2, Vec2, float ) -> Vec2
-
-
Vec3 ( float, float, float )
-
Attributes
- x ( get, set )
- y ( get, set )
- z ( get, set )
-
Methods
- div ( float ) -> Vec3
- mult ( float ) -> Vec3
- length () : returns the length of the vector
- normalize () : normalizes the vector
-
Class methods
- dist( Vec3, Vec3) : returns the distance between two 3D vectors
- lerp ( Vec3, Vec3, float ) -> Vec3
-
-
Vec4 ( float, float, float, float )
-
Attributes
- x ( get, set )
- y ( get, set )
- w ( get, set )
- h ( get, set )
-
Methods
- div ( float ) -> Vec4
- mult ( float ) -> Vec4
- length () : returns the length of the vector
- normalize () : normalizes the vector
-
Class methods
- dist( Vec4, Vec4) : returns the distance between two 4D vectors
- lerp ( Vec4, Vec4, float ) -> Vec4
-
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
BasicVector-0.0.7.tar.gz
(3.8 kB
view hashes)
Built Distribution
Close
Hashes for BasicVector-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63848528a39889a1d3268372269b81dd2dc6991467bfbfb7f571b5bda9281474 |
|
MD5 | fcf20f38b9b1fa8c7ff8b90c522b0215 |
|
BLAKE2b-256 | e8e0373a6329fa0586eb9f400c744586031857b1fe92bb156cac904808bea8f3 |