# How to make a 2D gaussian Blur terms?

I want to make a 2D gaussian Blur coeffients. Now I am making 1D gaussian Blur term as following.

double Cmfc_test5Dlg::Guassian(int x, double sigma)
{
double c = 2.0 * sigma * sigma;
return exp(-x * x / c) / sqrt(c * 3.141592f);
}
double Cmfc_test5Dlg::GuassianTerms(int kernalSize, double sigma, int *terms)
{
for (int i = 0; i < kernalSize; ++i) {
terms[i] = Guassian(i - kernalSize / 2, sigma)*1024;
}
return 1;
}


But I want to make 2D instead of 1D. What should I do ?

terms[x, y] = terms[x]*terms[y]