#help with usingnamespace alternative

1 messages · Page 1 of 1 (latest)

thorny socket
#

the easiest way would be to use an array of data instead of seperate x, y, and z fields
also helps with naming when it comes to generically sized vectors

#

that way everything is kinda just generic over the size and the type, you dont need to have different implementations of stuff really

#

your new function could take an array of T

uncut cape
#

it looks like this is very similar yours @tulip hare

thorny socket
#

Oh thats a neat way to do it

#

Any reason m is a field and not a decl though?

uncut cape
#

no its a little more involved. first add a zero sized m: void field to the struct. then look at how add() and simd() are implemented.

uncut cape
#

afaik thats how the alternative works for mixins.