Generalized mean (Hölder mean) of all values in the array If the array is empty, it returns 0 or the defaultValue
import { generalizedMean } from '@kitsuyui/mymath'generalizedMean([1, 2, 3, 4], 1) // => 2.5generalizedMean([1, 2, 3, 4], 0) // => 2.213363839400643 Copy
import { generalizedMean } from '@kitsuyui/mymath'generalizedMean([1, 2, 3, 4], 1) // => 2.5generalizedMean([1, 2, 3, 4], 0) // => 2.213363839400643
Generalized mean (Hölder mean) of all values in the array If the array is empty, it returns 0 or the defaultValue
Example