-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add { float r; float i; } to vector2 #13
Comments
I should be able to make something like this happen. Let's chat about it a bit more. I'd like to have some consistency with The paradigm: In hindsight, I can't remember why I added that Your suggestion is to add A variant on this is to swap that disregarded 'a' in the quaternion and vector4 for letter vector2: vector3: (where the ones with the underscore should be disregarded) That results in: vector2: as well as variations with NOTE: I think the essential difference between what I'm proposing and what you are proposing is the ordering of the elements. Would that work for you? |
Well I'm no expert but I've using them the other way round, r aligning with x and i aligning with y, it feels natural to think of them that way as that's how the axis are named in math vids I sometimes watch, I stopped my official math education at GCSEs, the rest is just out of occasional interest, I suppose you could just name the structs as ri and xy to ensure other variations can be used without collisions Edit: Considering the usage it doesn't really matter which way round they go so I'll leave it to your discretion Edit 2: Was just thinking, since you spoke of vec3 & vec4 despite them having nothing to do with the closed scenario of real & imaginary numbers might as well posit an idea for some specific named structs in all 3
The r still stands for "real", the s, c, & q stand for "square root pair", "cubic root trio" and "quantum root quad", should make things clearer in the functions that need those values in that context instead of the usual {x, y, z, w} |
This was snipped from #12 and written by @awsdert -- moved here to split the issues
Also please add this struct to the union vec2s: struct { float r; float i; }
r is for the "real" numbers and i is for "imaginary" numbers (in case you are still having trouble understanding what "imaginary" numbers are, I think of them as square root pairs, for example i5 * i5 is -25, in "real" that would be -5 * 5 or 5 * -5, i5 represents that "real" pair)
Edit: Also do similar for any related unions please
The text was updated successfully, but these errors were encountered: