Thanks that worked. Although is there some where that tells me what "x mod 2" does. If feel like I might be missing out on some other cool functions.
On Nov 21, 2:31 pm, taz <[EMAIL PROTECTED]> wrote: > DJ, > > Visose is absolutely correct, but just be sure that you're working > with the most recent version of GH. > > The 1 = True, 0 = False automatic conversion disappeared for a bit > (briefly) but then David restored it. > > taz > > On Nov 21, 5:22 pm, visose <[EMAIL PROTECTED]> wrote: > > > Use a function component with the following expression: "x mod 2" > > It will return "1" for odd numbers and "0" for even numbers. If you > > connect this directly to a dispatch component, 1 will become true and > > 0 will become false. > > > What the function component does is basically divide by 2 and returns > > the remainder, even numbers divide by 2 without remainder so it > > returns 0, odd numbers don't. > > > On Nov 21, 10:17 pm, djnelson75 <[EMAIL PROTECTED]> wrote: > > > > I was curious is the a comparison function that will determine if a > > > number is even or odd. I have some function that is spitting out a > > > number and what I want to do is if the number is even I want a certain > > > configuration, but if it is odd then I want a different configuration. > > > Any ideas on how to accomplish this?
