[Question/Request] BP - Ternary flow control

Im curious if theres a way of doing this simply or if I need to build it using branches? Itd be great if there was a way to check if 2 floats for example, are <, > or = each with their own flow branch. I can just see this as something people may use often especially when equations require strict order of operations using division.

Just as an aside, testing 2 floats for equivalence is a slightly sketchy thing to do due to floating point precision. Doing that with int’s makes total sense though!

Ahh thanks for the input, I was actually looking for an approx function for vectors so Im not sure if theres one in there. I will end up writing one so maybe I can do similar but with a dead zone percentage (perturb) in the middle :slight_smile:

To elaborate on my specific usage in this instance is Im checking whether my groundspeed has successfully lerp’d back to its default value so I do know it will be equal at some point :slight_smile:

Just an update on this, I found what I needed. It wasnt under Flow Control it was under Float and its called Compare Float :slight_smile:

Hi Daniel,

I would suggest using a Function for the check, with two inputs and three outputs; and then calling the function whenever you need. I have attached a screenshot, let us know if you need anything else.

Ahh okay I’ll give that one a go see if its better than my solution :slight_smile:

ternaryusage.jpg