File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 55package vxform
66
77import (
8- "math/rand"
9-
108 "cogentcore.org/core/math32/minmax"
9+ "cogentcore.org/lab/base/randx"
1110)
1211
1312// Rand specifies random transforms
@@ -27,10 +26,10 @@ type Rand struct {
2726}
2827
2928// Gen Generates new random transform values
30- func (rx * Rand ) Gen (xf * XForm ) {
31- trX := rx .TransX .ProjValue (rand .Float32 ())
32- trY := rx .TransY .ProjValue (rand .Float32 ())
33- sc := rx .Scale .ProjValue (rand .Float32 ())
34- rt := rx .Rot .ProjValue (rand .Float32 ())
29+ func (rx * Rand ) Gen (xf * XForm , rnd * randx. SysRand ) {
30+ trX := rx .TransX .ProjValue (rnd .Float32 ())
31+ trY := rx .TransY .ProjValue (rnd .Float32 ())
32+ sc := rx .Scale .ProjValue (rnd .Float32 ())
33+ rt := rx .Rot .ProjValue (rnd .Float32 ())
3534 xf .Set (trX , trY , sc , rt )
3635}
You can’t perform that action at this time.
0 commit comments