import { default } from "https://deno.land/x/simplestatistic@v7.7.1/src/root_mean_square.js";
The Root Mean Square (RMS) is
a mean function used as a measure of the magnitude of a set
of numbers, regardless of their sign.
This is the square root of the mean of the squares of the
input numbers.
This runs in O(n)
, linear time, with respect to the length of the array.
Examples
rootMeanSquare([-1, 1, -1, 1]); // => 1
rootMeanSquare([-1, 1, -1, 1]); // => 1