I've been trying to make a code that casts 4 rays, takes the length of those 4 rays, and then determines what the longest one is. However, in order to do that I would need to find the largest of 4 numbers. Any ideas on how to do that?
We actually have a hidden MAX function that does what you want. Grab a dyadic (two-input) numeric operator such as + from the palette to the scripting area, then right-click on it and choose the "relabel" option. Then in the menu that appears, you can do this:
using four explicit input slots, or you can drag a list over the right arrow to accept a list of any length:
Just use this
The block is hidden behind relable. Right click any math reporter (+, -, etc), then click relable. There's a block called max, click that.
To get what I have, drag a list or a reporter onto the black arrow, and when there's a red halo, drop it.
Great, thanks!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.