Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
102 stars 0 forks source link

ProtoFlux Node: ValueHalf #1957

Open JackTheFoxOtter opened 1 week ago

JackTheFoxOtter commented 1 week ago

Is your feature request related to a problem? Please describe.

Often, you need half of a value.

Describe the solution you'd like

A node that outputs the input number divided by two.

Describe alternatives you've considered

Manually dividing by two.

Additional Context

No response

Requesters

Marsmaantje & Myself

shiftyscales commented 1 week ago

Can you provide additional context on the use-cases/reasons why you'd need half of a value in particular?

As you already highlighted- division exists, and can also handle getting a third, quarter, eighth, or any other arbitrary fraction of a value.

Banane9 commented 1 week ago

As you already highlighted- division exists, and can also handle getting a third, quarter, eighth, or any other arbitrary fraction of a value.

There is also nodes for -n, 1/n, ÷dT, ×dT, and many others, all of which could be handled easily with the basic arithmetic nodes - so the mere option of that is only a semi valid argument against adding a compact version.

Jack will have to tell you the particular use cases though.

Nytra commented 1 week ago

Nested nodes could solve this by allowing you to make a custom node to divide a value by two

shiftyscales commented 1 week ago

Yeah, as nodes go, it'd be real easy to add/implement, @Banane9 - I'm not arguing that.

Each of the other nodes you mentioned have particular use-cases that are known as they are fairly common operations- I was just curious what work flows the proposed node makes easier/more convenient because I can't personally recall many/any occasions that I've specifically needed half of a value in anything I've made.

art0007i commented 1 week ago

doubling / halving is a very common operation. for example if you have an object position that is aligned to a corner, then to center the object you'd subtract half of the size of the object.

JackTheFoxOtter commented 1 week ago

Pretty much that. Shifting objects by half of their size was my initial use-case. I just think it's a common enough operation that a dedicated node for it makes sense.