Legacy Dev Forum Posts

 View Only

Sign Up

  • 1.  Random Number Generator

    Posted 06-05-2025 19:09

    N25 | 2018-12-16 15:10:06 UTC | #1

    Is there a way to generate random numbers using only the built-in functions in Architect and not rely on an external source such as a webservice?


    Jason_Mathison | 2018-12-17 12:30:41 UTC | #2

    One option would be to grab the current second and use the modulus operator (%) to get a random number of the right size. 60 is divisible by 2,3,4,5,6,10,12,15,20 and 30 so it would cleanly support a random number of those sizes.

    --Jason


    N25 | 2019-01-14 01:57:37 UTC | #3

    Thank you so much for the tip Jason!


    system | 2019-02-14 01:57:43 UTC | #4

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 4196