projects
/
physik
/
morpheus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
removed idle print debug output
[physik/morpheus.git]
/
random.c
diff --git
a/random.c
b/random.c
index
3f8ed72
..
51b310b
100644
(file)
--- a/
random.c
+++ b/
random.c
@@
-13,7
+13,7
@@
extern u32 sum_z_cells;
extern int random_fd;
extern u32 sum_z_cells;
extern int random_fd;
-/* return random integer between 0 - max */
+/* return random integer between 0 - max
-1
*/
u32 rand_get(u32 max)
{
u32 rand_int;
u32 rand_get(u32 max)
{
u32 rand_int;
@@
-27,7
+27,8
@@
u32 rand_get(u32 max)
}
/* get z value (linear growth of probability with depths) */
}
/* get z value (linear growth of probability with depths) */
-u32 rand_get_lgp(int slope_nel,int start_nel) {
+u32 rand_get_lgp(int slope_nel,int start_nel)
+{
int z;
u32 i;
z=rand_get(sum_z_cells)+1; /* +1 as rand_get returns values 0...max-1 */
int z;
u32 i;
z=rand_get(sum_z_cells)+1; /* +1 as rand_get returns values 0...max-1 */
@@
-38,3
+39,4
@@
u32 rand_get_lgp(int slope_nel,int start_nel) {
return(i-1); /* return values 0...z_cell-1 */
}
return(i-1); /* return values 0...z_cell-1 */
}
+