From 202dd5f784b79b976da2966b41773c22d4a850c0 Mon Sep 17 00:00:00 2001 From: Thomas Fauskanger Date: Thu, 5 Jul 2018 15:06:24 +0200 Subject: [PATCH] Corrected the normalize-function As it were, the normalize-function did not return values in the range 0-100. I've updated it so that it do, given correct values for MIN and MAX. --- docs/src/pages/demos/progress/progress.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/pages/demos/progress/progress.md b/docs/src/pages/demos/progress/progress.md index 5827644b7993f3..a964e86ffa0f15 100644 --- a/docs/src/pages/demos/progress/progress.md +++ b/docs/src/pages/demos/progress/progress.md @@ -69,7 +69,7 @@ The progress components accept a value in the range 0 - 100. This simplifies thi // MAX = Maximium expected value // Function to normalise the values (MIN / MAX could be integrated) -const normalise = value => (value - MIN) * (MAX - MIN); +const normalise = value => (value - MIN) * 100 / (MAX - MIN); // Example component that utilizes the `normalise` function at the point of render. function Progress(props) {