Skip to content

Commit 31197f7

Browse files
committed
Apply code suggestions
Signed-off-by: Eng Zer Jun <[email protected]>
1 parent ef323c5 commit 31197f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plotter/scatterColor_example_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ func ExampleScatter_color() {
7474
_, _, z := scatterData.XYZ(i)
7575
d := (z - minZ) / (maxZ - minZ)
7676
rng := maxZ - minZ
77-
k := min(d*rng+minZ, maxZ)
78-
// Clamp k to avoid potential overflow due to floating point error
77+
k := d*rng + minZ
78+
// Clamp k to avoid potential overflow due to floating point error.
7979
c, err := colors.At(min(k, colors.Max()))
8080
if err != nil {
8181
log.Panic(err)

0 commit comments

Comments
 (0)