Name and describe this math operation (programming)
No bounty left

This relatively simple operation has been remarkably difficult for me to define.
float Foo(this float lhs, float rhs) => lhs * rhs.Sign();
It is intended to reframe lhs in the context of rhs's direction. For example, determining how much of the velocity of a videogame character is in the same direction as the player's input.
It serves a similar function to a scalar projection in one dimension.

Ṁ20 - I want a name that will be reasonably memorable, and short.
Ṁ30 - I want a simple one-sentence description that provides a perspective to think about it from, rather than just explaining what it does. (Similar to how one thinks of matrix multiplications as affine transformations, and not just a load of dot products.)

Get
Ṁ1,000
to start trading!
© Manifold Markets, Inc.TermsPrivacy