Message 1 of 3
bit math

Not applicable
07-02-2012
09:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'd like to use bit codes in a similar way that object snap does (OSMODE variable). For example 0 NONe , 1 ENDpoint , 2 MIDpoint ,4 CENter ,8 NODe ,16 QUAdrant ,32 INTersection et cetera
I'm not sure how to do the math though to figure out what for example 33 means. I can see that 33 in binary 00100001 would mean EndPoint and Intersection. Would you need to define Intersection = "00100000" , endpoint = "00000001", etc. and compare strings, or is there another much simpler method?
thanks!