More constants are good!
feat: add axis normal vector constants to float and int modules #5
seancribbs/vec:seancribbs/axis-normal-vectors into main Good idea but the naming is confused with these functions, maybe the name should be x_positive, y_positive ext... would be better, and follow with that ?_negative would be useful too. As this would be similar to Godot's LEFT, RIGHT, UP, DOWN consts without enforcing which axis/sign to which direction.
I would personally get rid of the x and y functions as the vec type is not opaque and you can do vec.x and vec.y. I don’t see the verbosity in positive_x and positive _y
Happy to add neg_x, etc, and rename as needed. What's the consensus?
Yep positive_* and negative_* is the way ;)
@renatillas wrote in #5 (comment):
I would personally get rid of the x and y functions as the vec type is not opaque and you can do vec.x and vec.y.
Yeah I know, I usually don't make that kind of functions, but the stdlib do have first and second functions for pair while user can just do pair.0, pair.1. So I think that: type that are generic and get use regular should have functions that extract element from it so it can be use in list.map(vec2.x) for example.
23f66c361e
to d0eb87c288
@NNB I've updated my diff with the changes you suggested, let me know what you think!
This seem good, Ima merge this now and retouch up some stuff and publish the change tomorrow, thank you!
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?