[Closed] 4.6.1 Pure Function - Float Input resets to 0
The editor really doesn't like it when you divide by 0. So when my float variable plugged into the input of a pure function gets set to 0 on it's way in, it just ruins my day. :p
The Variable(.16) plugs into the pure function, which on the inside multiplies an Int(100), and then goes into the bottom of a float divide node(1000 on top).
I took the pure function out of the process, no problems. I plugged it back in, unplugged the line from the input and manually set the float, also no problems.
This only happens when the input is coming from outside the Pure Function.
The question has been closed Jan 14 '15 at 10:55 AM by Zeustiak for the following reason:
Changing a variable name dropped lines going into an interface, resulting in 0.
inside the function, you can check if X == 0, and branch into different logic for that special case. maybe you want it to return the highest number that type can hold, maybe you want to return 0, maybe you want to log an error, it depends on what this function is supposed to accomplish.
what is the goal of this function? what does the returned number represent? what is the behavior you want to happen when X==0?
Follow this question
Once you sign in you will be able to subscribe for any updates here