Jump to content
43oh

RomixNL

Members
  • Content Count

    1
  • Joined

  • Last visited

Everything posted by RomixNL

  1. How do I create random numbers in Energia? A call to random(5) produces: Arnold.cpp.o: In function `setup': Arnold.cpp:190: undefined reference to `random(long)' collect2: ld returned 1 exit status The random functions are disabled in WMath.cpp #if 0 #if 0 void randomSeed(unsigned int seed) { if (seed != 0) { srandom(seed); } } long random(long howbig) { if (howbig == 0) { return 0; } return random() % howbig; } long random(long howsmall, long howbig) { if (howsmall >= howbig) { return howsmall; } long diff = howbig - howsmall; ret
×
×
  • Create New...