diff options
Diffstat (limited to 'engines/sci/engine/kmath.cpp')
-rw-r--r-- | engines/sci/engine/kmath.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/sci/engine/kmath.cpp b/engines/sci/engine/kmath.cpp index fb8a191337..85b3f3d020 100644 --- a/engines/sci/engine/kmath.cpp +++ b/engines/sci/engine/kmath.cpp @@ -25,6 +25,8 @@ #include "sci/include/engine.h" +namespace Sci { + reg_t kRandom(state_t *s, int funct_nr, int argc, reg_t *argv) { return make_reg(0, SKPV(0) + (int)((SKPV(1) + 1.0 - SKPV(0)) * (rand() / (RAND_MAX + 1.0)))); } @@ -164,3 +166,5 @@ reg_t kTimesCot(state_t *s, int funct_nr, int argc, reg_t *argv) { } else return make_reg(0, (gint16)(tan(param * PI / 180.0) * scale)); } + +} // End of namespace Sci |