yoanlcq / vek

Generic 2D-3D math swiss army knife for game engines, with SIMD support and focus on convenience.
https://docs.rs/vek
Apache License 2.0
282 stars 32 forks source link

Consider re-exporting crates with traits that vek depend on #75

Closed NiklasJonsson closed 3 years ago

NiklasJonsson commented 3 years ago

I tried to use Mat4::abs_diff_eq but it seems to be implemented using a trait from another crate (approx). As I understand it, in order to use this I have to add approx to my own Cargo.toml and make sure the versions match. In case of version mismatch (IIRC if I specify a version vek is not compatible with) it won't compile. If I have another dependency which uses approx similarly, I'm not sure I can resolve it if vek and my other dependency don't agree on compatible versions?

Anyhow, I'd prefer if vek re-exported crates (or maybe just the traits) so that I can get the right approx version with something like: use vek::approx::AbsDiffEq There is some related discussion in the api-guidelines repo here

yoanlcq commented 3 years ago

This is very useful information! I've published a new version 0.15.1 with what I think is the appropriate fix. Please let me know if that works for you.

NiklasJonsson commented 3 years ago

It works great, thank you for the quick response!

yoanlcq commented 3 years ago

Anytime!