image: simplify skew randomization. Use rndf instead of rand.Float64 voodoo.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 27 Apr 2011 15:55:36 +0200
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
image.go
→
image.go
@@ -161,7 +161,7 @@ }
} func (img *Image) drawDigit(digit []byte, x, y int) { - skf := rand.Float64() * float64(rnd(-maxSkew, maxSkew)) + skf := rndf(-maxSkew, maxSkew) xs := float64(x) minr := img.dotSize / 2 // minumum radius maxr := img.dotSize/2 + img.dotSize/4 // maximum radius