Skip to content

Commit

Permalink
[docs] Correct the normalize-function (mui#12066)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fauskanger authored and Joe Shelby committed Jul 14, 2018
1 parent 6a8ddb2 commit 62b3838
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/pages/demos/progress/progress.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 62b3838

Please sign in to comment.