Working gauss function, but only for angles < 180