hyperPad hyperPad Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Login

    Random Number Inconsistency With Negative Values And Decimal Values

    Scheduled Pinned Locked Moved Bug Reports
    5 Posts 3 Posters 1.3k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Jack de WildeJ Offline
      Jack de Wilde
      last edited by Jack8680

      When a random number is picked between two positive values, both numbers can be selected, but when a negative number is used, the lower bound is one higher. For example, a random number between 1 and 3 can return 1, 2, or 3. But a random number between -1 and 1 will only return 0 or 1. The lower value is not included. I've always worked around this, but it's slightly annoying. Another bug with random numbers is that when a decimal is used, it ceilings the upper bound. For example, a random number between 0.0 and 1.3 can return 1.9.
      EDIT: after further testing, it turns out it doesn't ceiling the upper bound, but adds one. So the previous example could even return 2.2.

      1 Reply Last reply Reply Quote 0
      • HamedH Offline
        Hamed Admin
        last edited by

        For any new random number behaviour, this is fixed.

        1 Reply Last reply Reply Quote 0
        • MurtazaM Offline
          Murtaza Admin
          last edited by

          In the next update (1.17)

          Jack de WildeJ 1 Reply Last reply Reply Quote 0
          • Jack de WildeJ Offline
            Jack de Wilde @Murtaza
            last edited by

            @Murtaza will there be a new TestFlight beta released soon?

            1 Reply Last reply Reply Quote 0
            • HamedH Offline
              Hamed Admin
              last edited by

              @Jack8680 right now. Go check the testflight app or your emails for the latest build.

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post