| Crates.io | vectorlib |
| lib.rs | vectorlib |
| version | 0.1.2 |
| created_at | 2023-07-13 14:42:37.731906+00 |
| updated_at | 2023-07-13 14:52:44.48414+00 |
| description | The following library is created for handling the `vector` for the animation library and should work for any graphical library like rylib or sdl2 |
| homepage | |
| repository | https://github.com/Ghasak/vectorlib |
| max_upload_size | |
| id | 915428 |
| size | 49,113 |
The following library is created for handling the vector for the animation library where we put our engine.
The libray has several modules and support
2023-07-13 20:32:
vectorlib is ready to be deployed.2023-07-12 22:53:
.add() method and the operators
for all the given operations (addition, subtractions, multiplication,
division)2023-07-12 23:22:
verboseVectors which will let us know when the
vector gets dropped from the memeory (useful for debugging purposes).2023-07-10 21:36:30:
vectorlibEngine crate for our animation platform.2023-07-12 22:24:
verboseVectors I have used the composition of and built on top
of the vector2d. This was necessary since I cannot add a nother field
called verbose for the struct of Vector2d (stand Add, Sub, Div
and Mul needs only two fields).std::fmt::Display for the verboseVectors, I
found a creative way to extract first the Some(vector) since Option is
not implementing for the Display trait, check the std::fmt::Display trait at the end of the verbose_vector2d_module.rs module.2023-07-10 22:49:26:
Vector2d supports
.add(), .div(), .mul() and .sub() accepts only Vector2d cannot accept scalar
let s = v.div(8.0) will not work.vectorResult for example.lerp function.distance between two vectors.cross product similar to the dot product.negatezero vector initalizer.ones vector initalizer.src/main.rs which is not
necessary, but I created for demostration purposes.cargo run --quiet
# or
cargo run -j 10 --quiet
test/tests.rs script along side
with the documentation scripts for each metho in the
vectorlib::math::vector_module::Vector2d of Vector2d strcut methods.cargo test
test. To see the printed values during cargo test, you can use the
--nocapture flag. This flag prevents the test framework from capturing the
output, allowing the printed values to be displayed in the console.cargo test -- --nocapture
# Or
cargo test -j 8 -- --nocapture