assurance-tunnel
assurance-tunnel
assurance-tunnel
assurance-tunnel

Math question (for javascript?)



  • Hi to math enthusiasts from a math dumb...

    I have a problem I can't solve. In order my patch to work à need 4 random integers ranging from 1 to 15 to change every minute, but I need those 4 integers to be all different between them. I can't find a solution in Isadora. That's my attempt. Anyone has an idea? Maybe javascript?
    Thanks
    Armando


  • Solved!!!

     Thanks izzy!!

    d3735f-nonredundant-4-parts-shuffle.izz



  • I thought I'd try the javascript actor but unfortunately my first attempt looped for ever and I hadn't saved it!

    So I thought I'd try again using the internet and stack overflow came up with an answer!
    Try copy and pasting this into a javascript actor (make sure it has 4 outputs. You can trigger it with a bang). var arr = [] while(arr.length < 8){ var randomnumber=Math.ceil(Math.random()*100) var found=false; for(var i=0;i


  • Thanks I'll test it as soon as I have time