MCPcopy
hub / github.com/fogleman/primitive / NewRandomRotatedEllipse

Function NewRandomRotatedEllipse

primitive/ellipse.go:109–117  ·  view source on GitHub ↗
(worker *Worker)

Source from the content-addressed store, hash-verified

107}
108
109func NewRandomRotatedEllipse(worker *Worker) *RotatedEllipse {
110 rnd := worker.Rnd
111 x := rnd.Float64() * float64(worker.W)
112 y := rnd.Float64() * float64(worker.H)
113 rx := rnd.Float64()*32 + 1
114 ry := rnd.Float64()*32 + 1
115 a := rnd.Float64() * 360
116 return &RotatedEllipse{worker, x, y, rx, ry, a}
117}
118
119func (c *RotatedEllipse) Draw(dc *gg.Context, scale float64) {
120 dc.Push()

Callers 1

RandomStateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…