in reply to Re^4: Detecting whether UV fits into an NV
in thread Detecting whether UV fits into an NV
Nice! I'm glad you got a usful result.
Regarding thinking of that trick: I didn't think of it either, but years ago, I read a document that had a lot of bit-fiddling tricks in it, and remembered that there was a trick for that, and my Google-fu let me dredge it up.
When your only tool is a hammer, all problems look like your thumb.