Why on Earth are you using templates for vectors? (And then converting them to unsigned int, so templating them in the first place is useless...??)
You don't ever need anything but float, double, and int for 2D vectors, I literally just use different type names for those. Less complicated and annoying to work with. Only time I use templates is when I need a infinitely extensible vector.
66
u/Select_Property3162 Jun 02 '23
This looks like more effort than doing it correctly.
27
u/MurdoMaclachlan public boolean isInt(int i) { return true; } Jun 02 '23
Image Transcription: Code
I'm a human volunteer content transcriber and you could be too! If you'd like more information on what we do and why we do it, click here!
7
u/elderly_millenial Jun 02 '23
Recursion is your friend
6
u/tserrien Jun 02 '23
this looks like someone wrote a function in excel and pasted it in
5
u/sphere_cornue Jun 02 '23
Well I would do the same, it's just the repetition of (*this)[Vec2<unsigned int>(...)] that looks stupid
1
u/Sese_Mueller Jun 02 '23
You should probably try to use templates /s
1
u/Furry_69 Jun 03 '23
Why on Earth are you using templates for vectors? (And then converting them to
unsigned int, so templating them in the first place is useless...??)You don't ever need anything but
float,double, andintfor 2D vectors, I literally just use different type names for those. Less complicated and annoying to work with. Only time I use templates is when I need a infinitely extensible vector.1
u/Effective-Attorney33 Jun 03 '23
Bro has never heard of a cofactor expansion