#include "gauss.h"
#include <cmath>
#include <iostream>
#define PI 3.1415926535
//#define PI_2 0.39894228
static const double pi2=1/sqrt(2*PI);

void Gauss::Wyswietl()
{
	// cout << nazwa << "    " << " srednia =" << x << " odchylenie =" << s << endl;
	cout << *this << endl;
}

ostream& operator<<(ostream &o, const Gauss &w)
{
	o <<  w.nazwa << " srednia= " << w.x << " odchylenie= " << w.s;
	return o;
}

double Gauss::operator()(double x)
{
	return exp(-(x-this->x)*(x-this->x)/(2*s*s))*pi2/s;;
}

