Source: https://people.reed.edu/~jerry/311/fourierinv.pdf