ca5174b41e
vectors: factor out and implement 3D vector
...
• factor out the vectors to separate module
• implement ‹Vector3D›
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-01-07 16:18:42 +01:00
9aa15bbf6f
vector2d: Implement ‹Index› and ‹IndexMut› traits
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-01-03 22:10:26 +01:00
cdd4087cd6
vector2d: refactor ‹in_range›
2022-12-30 12:11:56 +01:00
b02e7207ac
vector2d: refactor indexing
2022-12-30 12:11:41 +01:00
bf8c4ddc67
vector2d: use slice instead of Vec
...
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-12-14 15:35:56 +01:00
fabef3ee41
vector2d: fix a silly typo
...
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-12-12 10:30:39 +01:00
3219400a73
vector2d: implement subtraction of vectors
...
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-12-09 12:15:40 +01:00
fa7cc5c241
vector2d: implement few traits and helpers
...
• Derive ordering
• Implement indexing over 2D Vec with a ‹Vector2D›
• Implement boundary checks for ‹Vector2D› indices over 2D Vec
• Implement ‹swap› on ‹Vector2D›
• Implement dot product and scalar product for ‹Vector2D›
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-12-08 16:02:14 +01:00
47cbe771a3
chore: add skeletons and prepary directories
...
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-12-01 11:04:36 +01:00