|
@@ -18,13 +18,14 @@ Float function random():
|
|
|
seed = integer_modulo(a * seed + c, m)
|
|
|
|
|
|
// The seed is the new value
|
|
|
- return float_division(seed, m)!
|
|
|
+ return float_division(cast_float(seed), cast_float(m))!
|
|
|
|
|
|
Integer function random_interval(a : Integer, b : Integer):
|
|
|
if (a == b):
|
|
|
return a!
|
|
|
else:
|
|
|
- return cast_integer(random() * (b - a + 1) + a)!
|
|
|
+ log("Random gives us: " + cast_value(random()))
|
|
|
+ return cast_integer(random() * cast_float(b - a + 1) + cast_float(a))!
|
|
|
|
|
|
Element function random_choice(list : Element):
|
|
|
if (list_len(list) == 0):
|