Show HN: A fast, lightweight vector3D C++ library
2 comments
Cool! I would use a template parameter so that a user can choose between float and double [1]. I would add support for vector arrays (AOS and SOA) [2]. I'm not sure if your angle calculation algorithm is computationally cheap [3].
[1] https://stackoverflow.com/questions/4584637/double-or-float-...
[2] https://stackoverflow.com/questions/40163722/is-my-understan...
[3] https://stackoverflow.com/questions/1427422/cheap-algorithm-...
[1] https://stackoverflow.com/questions/4584637/double-or-float-...
[2] https://stackoverflow.com/questions/40163722/is-my-understan...
[3] https://stackoverflow.com/questions/1427422/cheap-algorithm-...
Hi, thanks for the advice. The template idea is great. I will implement it in the future.
I was also thinking about the vector arrays. Although I still don't know how to make it work. I'm interested in implementing something like this Julia package: https://juliaarrays.github.io/StructArrays.jl/stable/ but for C++. The problem is that C++ does not support reflection, therefore is a bit complicated. But it's on my to-do list. For now, I guess I can do a specific SOA implementation.
I know the angle calculation is not fast. But I don't want to sacrifice precision.
I was also thinking about the vector arrays. Although I still don't know how to make it work. I'm interested in implementing something like this Julia package: https://juliaarrays.github.io/StructArrays.jl/stable/ but for C++. The problem is that C++ does not support reflection, therefore is a bit complicated. But it's on my to-do list. For now, I guess I can do a specific SOA implementation.
I know the angle calculation is not fast. But I don't want to sacrifice precision.
I created a simple vector3D C++ library for scientific and video game coding. I tried to make it as fast as I could. I would love it if you could give me feedback on the library. Also, do you know how to make it faster?
Here is the link to the repo: https://github.com/cdelv/Vector3D
All the usage instructions and documentation is in the Readme.