/// Evolver Copyright 2000, Morgan McGuire
/// matrix@alum.mit.edu   http://graphics3d.com/matrix
public abstract class BitwiseOperator extends MultiArgumentOperator implements ELOperator
{
  /**
   * Override to define your bitwise operator.
   */
  abstract protected int bitwiseOp(int a, int b);
  
  protected float combine(float a, float b)
  {
    float c = Float.intBitsToFloat(bitwiseOp(Float.floatToIntBits(a), Float.floatToIntBits(b)));
    
    if (Float.isNaN(c) || Float.isInfinite(c)) {
      return 0.0f;
    } else {
      return clamp(c);
    }
  }
}
