randomPoints returns some random x, y points.
(n int, rnd *rand.Rand)
| 108 | |
| 109 | // randomPoints returns some random x, y points. |
| 110 | func randomPoints(n int, rnd *rand.Rand) plotter.XYs { |
| 111 | pts := make(plotter.XYs, n) |
| 112 | for i := range pts { |
| 113 | if i == 0 { |
| 114 | pts[i].X = rnd.Float64() |
| 115 | } else { |
| 116 | pts[i].X = pts[i-1].X + rnd.Float64() |
| 117 | } |
| 118 | pts[i].Y = pts[i].X + rnd.Float64()*1e4 |
| 119 | } |
| 120 | return pts |
| 121 | } |
| 122 | |
| 123 | // CommaTicks computes the default tick marks, but inserts commas |
| 124 | // into the labels for the major tick marks. |
no outgoing calls
no test coverage detected