View Single Post
  #5  
Old March 18th, 2007, 03:54 PM
DrPraetorious's Avatar

DrPraetorious DrPraetorious is offline
Major General
 
Join Date: Feb 2005
Location: Lake of Hali, Aldebaran, OH
Posts: 2,474
Thanks: 51
Thanked 67 Times in 27 Posts
DrPraetorious is on a distinguished road
Default Re: tool request (terrain math)

Oh, yeah, both of those are awk scripts. You could do it with sed as well, of course, but I don't know the bitwise operators in sed.

No, it doesn't check - but it's a bitwise or, so nothing should change if the bit is set already (or isn't set already, depending.)

If you add something like:
Code:

if (and($3,mask)==mask){print mask " already set at " $2;}



It'll check bitmasks as well.
__________________
If you read his speech at Rice, all his arguments for going to the moon work equally well as arguments for blowing up the moon, sending cloned dinosaurs into space, or constructing a towering *****-shaped obelisk on Mars. --Randall Munroe
Reply With Quote