chore(growth): move nil logic to scorer behaviour
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
Handle `nil` measurement in `Growth.Score.Scorer`.
This commit is contained in:
@@ -23,7 +23,7 @@ defmodule Growth.Calc.Centile do
|
||||
|
||||
alias Growth.Calc.ZScore
|
||||
|
||||
@spec compute(number(), ZScore.l(), ZScore.m(), ZScore.s()) :: number() | :na | nil
|
||||
@spec compute(number(), ZScore.l(), ZScore.m(), ZScore.s()) :: number() | :na
|
||||
@doc """
|
||||
Compute the centile for a given measurement (`y`) and the Box-Cox values: power (`l`), median (`m`), and
|
||||
coefficient of variation (`s`).
|
||||
@@ -36,10 +36,6 @@ defmodule Growth.Calc.Centile do
|
||||
19.0
|
||||
|
||||
"""
|
||||
def compute(nil, _, _, _) do
|
||||
nil
|
||||
end
|
||||
|
||||
def compute(y, l, m, s) do
|
||||
zscore = ZScore.raw(y, l, m, s)
|
||||
|
||||
|
Reference in New Issue
Block a user