glob3mobile / g3m

The multiplatform advanced visualization framework
http://www.glob3mobile.com/
Other
116 stars 56 forks source link

rand() C++ to Java Problem #106

Closed stefaniea closed 9 years ago

stefaniea commented 9 years ago

using the rand() function in C++ does not get converted correctly to Java. Is there another function to get a random number that is known to work with the converter?

DiegoGomezDeck commented 9 years ago

The singleton IMathUtils::instance() is there to hide those differences between platforms.

In your case: /* answer a double value in the range 0.0 (inclusive) and 1.0 (exclusive) / virtual double nextRandomDouble() const = 0;

stefaniea commented 9 years ago

Great! Thank you!