From fa65a3685211d19c68bfc18290fbb8e410a00faa Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Sat, 5 Oct 2024 12:58:36 +0000 Subject: [PATCH] test(growth): fix doctest for centile and percentile --- lib/growth/calc/centile.ex | 4 ++-- lib/growth/calc/percentile.ex | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/growth/calc/centile.ex b/lib/growth/calc/centile.ex index 5ae7ea2..71a4d05 100644 --- a/lib/growth/calc/centile.ex +++ b/lib/growth/calc/centile.ex @@ -17,7 +17,7 @@ defmodule Growth.Calc.Centile do ...> [-1.2, -1.6318, 16.049, 0.10038] ...> ] iex> Enum.map(measures, &apply(Growth.Calc.Centile, :compute, &1)) - [:na, :na, 19.0] + [13.05127032828574, 27.884359024082663, 14.37765739914362] """ @@ -32,7 +32,7 @@ defmodule Growth.Calc.Centile do ## Examples: iex> Growth.Calc.Centile.compute(0.0, -1.6318, 16.049, 0.10038) - 19.0 + 16.049 """ def compute(z_score, l, m, s) when -3 <= z_score and z_score <= 3 do diff --git a/lib/growth/calc/percentile.ex b/lib/growth/calc/percentile.ex index 8e1a1a6..95718b5 100644 --- a/lib/growth/calc/percentile.ex +++ b/lib/growth/calc/percentile.ex @@ -7,7 +7,7 @@ defmodule Growth.Calc.Percentile do ## Examples iex> z_scores = [-1.0, 0.0, 1.0] - iex> Enum.map(z_scores, &apply(Growth.Calc.Percentile, :compute, :&1)) + iex> Enum.map(z_scores, &apply(Growth.Calc.Percentile, :compute, [&1])) [0.15865525393145707, 0.5, 0.8413447460685429] """