import { gaussian } from "../gaussian.js";

/**
 *
 * @param {number} variance
 * @param {number} distance_from_mean
 * @returns {number}
 */
export function gaussian_amplitude(variance, distance_from_mean) {
    // Adapted from https://github.com/Kitware/VTK/blob/af928016f4041ad8a6a193d032355b909721fc95/Common/Core/vtkMath.cxx#L339

    return 1.0 / Math.sqrt(2.0 * Math.PI * variance) * gaussian(variance, distance_from_mean);
}