Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
|
|
|
1 | | /* Copyright (c) 2010 Wildfire Games |
| 1 | /* Copyright (c) 2015 Wildfire Games |
2 | 2 | * |
3 | 3 | * Permission is hereby granted, free of charge, to any person obtaining |
4 | 4 | * a copy of this software and associated documentation files (the |
… |
… |
|
7 | 7 | * distribute, sublicense, and/or sell copies of the Software, and to |
8 | 8 | * permit persons to whom the Software is furnished to do so, subject to |
9 | 9 | * the following conditions: |
10 | | * |
| 10 | * |
11 | 11 | * The above copyright notice and this permission notice shall be included |
12 | 12 | * in all copies or substantial portions of the Software. |
13 | | * |
| 13 | * |
14 | 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
15 | 15 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
16 | 16 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
… |
… |
|
72 | 72 | x = xrand(); |
73 | 73 | } |
74 | 74 | while(x >= range * inv_range); |
75 | | x /= inv_range; |
| 75 | x %= range; |
76 | 76 | |
77 | 77 | x += min_inclusive; |
78 | 78 | ENSURE(x < max_exclusive); |