Browse Source

image: simplify skew randomization.

Use rndf instead of rand.Float64 voodoo.
Dmitry Chestnykh 14 years ago
parent
commit
b8bb54f620
1 changed files with 1 additions and 1 deletions
  1. 1 1
      image.go

+ 1 - 1
image.go

@@ -161,7 +161,7 @@ func (img *Image) strikeThrough() {
 }
 }
 
 
 func (img *Image) drawDigit(digit []byte, x, y int) {
 func (img *Image) drawDigit(digit []byte, x, y int) {
-	skf := rand.Float64() * float64(rnd(-maxSkew, maxSkew))
+	skf := rndf(-maxSkew, maxSkew)
 	xs := float64(x)
 	xs := float64(x)
 	minr := img.dotSize / 2               // minumum radius
 	minr := img.dotSize / 2               // minumum radius
 	maxr := img.dotSize/2 + img.dotSize/4 // maximum radius
 	maxr := img.dotSize/2 + img.dotSize/4 // maximum radius