/vqdr/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/vqdr/trunk

« back to all changes in this revision

Viewing changes to tests/random-d6.vala

  • Committer: Gustav Hartvigsson
  • Date: 2022-06-01 20:50:29 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20220601205029-cmy0mxi9x59bzymx
Added int32_abs () to Utils.

Made Dice.roll () use uint32 as it's return value. It can never be negative, so...

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
      int32 count[7] = {0};
41
41
      int32 rolls = 1000000;
42
42
      for (size_t i = 0; i < rolls; i++) {
43
 
        int32 r = d.roll ();
 
43
        uint32 r = d.roll ();
44
44
        
45
45
        count[r] += 1;
46
46
      }
60
60
      int32 count[7] = {0};
61
61
      int32 rolls = 1000000;
62
62
      for (size_t i = 0; i < rolls; i++) {
63
 
        int32 r = d.roll ();
 
63
        uint32 r = d.roll ();
64
64
        
65
65
        count[r] += 1;
66
66
      }