#vector #mini #applications #type

minvect

A mini vector library

8 releases

0.1.7 Feb 17, 2024
0.1.6 Dec 15, 2023
0.1.5 Nov 9, 2023
0.1.3 Oct 28, 2023

#3 in #mini

Download history 54/week @ 2024-02-10 176/week @ 2024-02-17 30/week @ 2024-02-24 6/week @ 2024-03-02 9/week @ 2024-03-09 2/week @ 2024-03-16 63/week @ 2024-03-30 19/week @ 2024-04-06

85 downloads per month
Used in 3 crates

MIT license

26KB
721 lines

Minvect

A mini vector library, I mean its mostly for me but feel free to use. The point is for these to be the base types to use for associated applications / libraries to not have to always be converting between.

Todo

    pub const fn to_mat3(&self) -> [f32; 9] {
        [
            self.wh.x, 0.0, -self.xy.x,
            0.0, self.wh.y, -self.xy.y,
            0.0, 0.0, 1.0
        ]
    }

its more ideal to get the transform of a rect because eg could have some vertex data to transform via a uniform could also transform it cpu side too but yea there is rect mat3 equivalence and i want to capture it

also eg rect dilate rect centroid

surely needing dist point to rect signed distance probably replaces most other things same thing with segment etc

nb a macro would just need map_each and sum and then all the code would need only the overloads and thats it. i mean the overloads just need map each i guess i guess proc macro shit was good with map_each. maybe one day

Dependencies

~0.4–1MB
~24K SLoC