-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch from vecn
function to vecn!
macro
#109
Comments
Yeah, that would be useful.
I don't think this one makes sense, the size is already expressed in the macro name, one would just call |
Can the existing const macros be merged into the idea of these new macros? Is there a reason to keep const and non-const initialization separate? As an intermediate step, would you be interested in merging the const macros with these functions to create new macros that are also const? It would be very nice to have a single shorthand for creating values. The new macros could later be extended with scalar splat or array construction. |
The It might be possible to merge Long term if SIMD constructors in |
Decided not to do this. |
It might be more useful if functions like
vec2
,vec3
,mat2
etc became macros as then they could support different parameter types, e.g.vec4!(1.0, 2.0, 3.0, 4.0)
- regular constructionvec4![1.0, 2.0, 3.0, 4.0]
orvec4![2.0; 4]
- array constructionvec4!(3.0)
- splat from a scalarIt might mean these are a bit more useful than the currently are.
The text was updated successfully, but these errors were encountered: