Open user202729 opened 7 months ago
One benefit of veclen(\x1,\y1)
than veclen(\p1)
: the former indicates that veclen
takes two arguments.
That's true, but also worth mentioning that the user could do that.
It's a bit tricky though. Everything is done through macro expansion, so a function that "takes" coordinate argument actually just take two consecutive number arguments.
a coordinate does not expand to two numbers, hence in that sense it is not a data structure. In the case of node, holds the name and then chooses by default the center anchor for convenience. Expanding \p1
does not seem to me a huge time saver here.
Currently the Euclid tutorial introduces \p1
as "\p<digit>
yields the same as \x<digit>,\y<digit>
". We could add some words like
"So practically veclen(\p1)
is the same as veclen(\x1, \y1)
, but Euclid prefers the latter form to inform himself that veclen()
takes two arguments."
Brief outline of the proposed feature
As mentioned in the title. I think this could clean up the code.
Usage example
No response