Hi Christoph,

ahh, good old times, you are trying to use a 8bit bitmask right?
Angular expressions are not javascript. Perhaps bitwise operators won’t 
work at all. (I didn’t try, I could be off here!)
here is a small helper function that might be of use:

*function hasbit(val, bitnum) {
   var masks = [0,1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384]
   return !! ((val & masks[bitnum]) === masks[bitnum]);
}*

This replaces the previous version I posted (and deleted). This one is way 
more efficient. (and less buggy ;) )

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to