Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
hyperPad

hyperPad Forum

  1. Home
  2. Bug Reports
  3. Random Number Inconsistency With Negative Values And Decimal Values

Random Number Inconsistency With Negative Values And Decimal Values

Scheduled Pinned Locked Moved Bug Reports
5 Posts 3 Posters 1.3k Views 1 Watching
  • 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 WildeJ Offline
    Jack de Wilde
    wrote on last edited by Jack8680
    #1

    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
    0
    • HamedH Offline
      HamedH Offline
      Hamed
      Admin
      wrote on last edited by
      #2

      For any new random number behaviour, this is fixed.

      1 Reply Last reply
      0
      • MurtazaM Offline
        MurtazaM Offline
        Murtaza
        Admin
        wrote on last edited by
        #3

        In the next update (1.17)

        Jack de WildeJ 1 Reply Last reply
        0
        • MurtazaM Murtaza

          In the next update (1.17)

          Jack de WildeJ Offline
          Jack de WildeJ Offline
          Jack de Wilde
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0
          • HamedH Offline
            HamedH Offline
            Hamed
            Admin
            wrote on last edited by
            #5

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

            1 Reply Last reply
            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
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Search