Grasshopper

algorithmic modeling for Rhino

Hi everyone,

 

How do we assign a number to "true" or "false".

 

Say : true = 1 and false = 0?

 

I saw this somewhere in the forum but I can't find it. 

 

Thanks!

 

Ben

Views: 20005

Replies to This Discussion

If you supply a Boolean value where a number value is required it will automatically get converted (true=1,false=0)

If you had a pattern of booleans and you wanted a different number to correspond to true and false you could just use a list item component:

Hey Dan,

 

Once again, thanks a lot!

Oh the item solution I did not know...I like it. I use to do it like this:

Best Regards

 

DeDackel

Am I crazy? I am trying to convert a list of 1 and 0's to true false and this method is not working, also tried it your way (as pictured) and it is still not working?!

Boolean values are inherently binary where "False" = "0" and "True" = "1."

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service