Skip to content
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

MathOperations are always addition with initial properties #419

Closed
zbarbuto opened this issue Oct 4, 2023 · 1 comment
Closed

MathOperations are always addition with initial properties #419

zbarbuto opened this issue Oct 4, 2023 · 1 comment

Comments

@zbarbuto
Copy link

zbarbuto commented Oct 4, 2023

Starting with a basic setup of (A=1 B=3) -> MAX -> watch - the numbers are actually added together and we get 4

image

If we manually change the OP to min, we get the expected value of 1
image

Then manually changing back to max we get the corrected max value of 3
image

This applies to all of the basic math nodes, such as * or - - the initial output is always addition (examples shown are both fresh graphs without manually changing the OP property):

image

image

Playing around with some breakpoints in the example project, it seems that since the operation's _func is not set until MathOperation.prototype.onPropertyChanged is called, the default _func of MathOperation (which is return A + B) is used even though the node added was a MIN/MAX node.

@jagenjo
Copy link
Owner

jagenjo commented Oct 5, 2023

yep, fixed, I did a push

@jagenjo jagenjo closed this as completed Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants