/[svn]/linuxsampler/trunk/src/scriptvm/CoreVMFunctions.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/scriptvm/CoreVMFunctions.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2619 by schoenebeck, Wed Jun 11 13:24:32 2014 UTC revision 2620 by schoenebeck, Wed Jun 11 13:31:27 2014 UTC
# Line 101  bool CoreVMFunction_random::acceptsArgTy Line 101  bool CoreVMFunction_random::acceptsArgTy
101  VMFnResult* CoreVMFunction_random::exec(VMFnArgs* args) {  VMFnResult* CoreVMFunction_random::exec(VMFnArgs* args) {
102      int iMin = args->arg(0)->asInt()->evalInt();      int iMin = args->arg(0)->asInt()->evalInt();
103      int iMax = args->arg(1)->asInt()->evalInt();      int iMax = args->arg(1)->asInt()->evalInt();
104      float f = float(::random()) / float(RAND_MAX);      float f = float(::rand()) / float(RAND_MAX);
105      return successResult(      return successResult(
106          iMin + roundf( f * float(iMax - iMin) )          iMin + roundf( f * float(iMax - iMin) )
107      );      );

Legend:
Removed from v.2619  
changed lines
  Added in v.2620

  ViewVC Help
Powered by ViewVC