Jump to content
Search Community

where is the bug!?

chrisi51 test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

2 minutes ago, GreenSock said:

Yes, that does appear to be a bug. I'll look into it, but a workaround is to make sure it's not EXACTLY 1 between the start and end values (offset it by at least 0.0001).

mhh ok ... both seem to work:

offset of 0.001 to end

var random_start = Math.random();
var random_end = random_start + ((Math.random() <= 0.5) ? 1.001 : -1.001);

or rounded start

var randomstart = Math.round(Math.random() * 10) / 10;
var random_end =random_start + ((Math.random() <= 0.5) ? 1 : -1);

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...