added haar2d (untested), used a constant for sqrt(2)