I fixed some English-as-a-second language problems in the README & added 'norm' as an alias for 'length' in vec2i/vec2f/vec3i/vec3f/vec4i/vec4f.
main #2
vistuleB/vec-fork:main into main Hi, thank you for the PR <3.
I will merge the "fixed some English-as-a-second language problems in the README".
But I have some question about the norm alias for length. I have never seen norm as a value/function to get vector's length, And I have checked Godot, Bevy, Phazer and Kaplay but none of them have norm as a way to get its length.
The name seem like an acronym of some word. I want to avoid acronym, seem like Gleam standard is to avoid acronym (even abs is int.absolute_value in Gleam).
Also, the name might get confuse with normalize functions (Normalize the vector).
Oh, and another thing, I think we should avoid alias as much as possible, to keep the API simple and avoid "too many ways to do the same thing".
But maybe there is something that I don't yet know or understand here. If anything, let me know ^^.
Just google "what is the norm of a vector" ;)
More seriously this a question of academic terminology versus game dev terminology. Some game dev engines try to keep words as "baby" as possible in order not to scare people away. But in a physics or math textbook the term "norm" is used.
Another example is the numpy library that uses the term "norm".
https://numpy.org/devdocs/reference/generated/numpy.linalg.vector_norm.html
Anyway "norm" is not an acronym, it's an ordinary word of the English language which is the math/physics term for "length of a vector".
Oh okay. I understand but these two point are still remain:
Also, the name might get confuse with
normalizefunctions (Normalize the vector).
I think we should avoid alias as much as possible, to keep the API simple and avoid "too many ways to do the same thing".
So... sorry, I cant merge this PR yet. I think this PR should only be about fixing the README.md, then we can open a new issue to discuss this further.
Thanks!
Hi thanks.
I understand the second point about keeping the API minimal and not wanting different names for different things. This is a valid aesthetic point.
Just FYI, for the "normalize" thing, "normalize" is a verb whereas "norm" is a noun. For a native English-speaking person (let alone someone with background in math&phys) there is no danger of confusion there. (Also norm has a different return type than normalize, thankfully.)
I will try to use your library without the norm, and get used to length :) I hope to build a 4x4 matrix library on top of it, at some point. (In separate package.)
Okay, I love to see the matrix library in future!
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?