Skip to content

Commit

Permalink
Update value.md (#3796)
Browse files Browse the repository at this point in the history
Fix example code for interpolateRound()
  • Loading branch information
wongmrdev committed Nov 3, 2023
1 parent 6e37f0a commit 4ca32f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/d3-interpolate/value.md
Expand Up @@ -57,7 +57,7 @@ Avoid interpolating to or from the number zero when the interpolator is used to
[Examples](https://observablehq.com/@d3/d3-interpolatenumber) · [Source](https://github.com/d3/d3-interpolate/blob/main/src/round.js) · Returns an interpolator between the two numbers *a* and *b*.

```js
d3.interpolateNumber(20, 620)(0.821) // 513
d3.interpolateRound(20, 620)(0.821) // 513
```

The interpolator is similar to [interpolateNumber](#interpolateNumber) except it will round the resulting value to the nearest integer.
Expand Down

0 comments on commit 4ca32f3

Please sign in to comment.