Yes
Got random to work by making a loop millisecond, of current time, number of times to generate different amount of random number each time the simulator starts, instead of always getting the identical range So did not need to write my own new random function.
Like:
let timer = new Date().getMilliseconds();
let total = 0
console.log("timer:" + timer);
for (; timer > 0; timer--) {
total += Math.random();
}
console.log("timer:" + timer + ", total: " + total);
BTW I had to use the random generated number else the build would see it was not used and not do it.
Hence this did not work:
for (; timer > 0; timer--) {
Math.random();
}
Best AnswerYes
Got random to work by making a loop millisecond, of current time, number of times to generate different amount of random number each time the simulator starts, instead of always getting the identical range So did not need to write my own new random function.
Like:
let timer = new Date().getMilliseconds();
let total = 0
console.log("timer:" + timer);
for (; timer > 0; timer--) {
total += Math.random();
}
console.log("timer:" + timer + ", total: " + total);
BTW I had to use the random generated number else the build would see it was not used and not do it.
Hence this did not work:
for (; timer > 0; timer--) {
Math.random();
}
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Thanks for posting this. We have a ticket for the issue.
Best Answer