-
Notifications
You must be signed in to change notification settings - Fork 95
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
Bikesheding of quantity_point::relative()
#479
Comments
|
Yes, and it nicely complements |
I think this should be resolved in analogy to #476: Instead of the unsafe |
So this is really #477, |
Some thoughts so far:
|
"Offset" is another alternative to the overloaded "vector". |
quantity_point::relative()
is considered "unsafe" as discussed in #414 (comment) but also really needed as mentioned in #414 (comment).We can discourage its use by making the name longer 😉
One of the proposals was to name it
relative_to_origin()
, but after a longer thought, I am not sure if the "relative" is the correct name here. We are used to it because it is n mp-units "forever", but it might not be a correct term in the domain.Even our documentation says explicitly that the affine space is about points and vectors where we model a vector with the
quantity
class template. So another candidate could bevector_from_origin
. This, however, might be also unfortunate as we also support vector and tensor quantity characters as documented here: https://mpusz.github.io/mp-units/2.0/users_guide/framework_basics/character_of_a_quantity and those names would collide and make it hard to understand what kind of "vector" we talk in each context.So maybe it should be just called
quantity_from_origin()
?Wikipedia article https://en.wikipedia.org/wiki/Affine_space also mentions "displacement vectors, also called translation vectors or simply translations" so maybe a
translation_from_origin()
is a good name here.Any thoughts?
The text was updated successfully, but these errors were encountered: