HISE Logo Forum
    • Categories
    • Register
    • Login

    display value with comma

    Scheduled Pinned Locked Moved General Questions
    3 Posts 2 Posters 100 Views
    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.
    • Y
      yall
      last edited by

      hello, how to display the value of a knob on a label?
      I use Label1.set("text", value); and that gives me 0.100000002000000 . the number is not round and if I use Math.round, I get 1 2 3... except that my knob is set to -0.5 > 0.5. THANKS :)

      LindonL 1 Reply Last reply Reply Quote 0
      • LindonL
        Lindon @yall
        last edited by

        @yall

        Math.round rounds to the next integer..

        Link Preview Image
        HISE | Docs

        favicon

        (docs.hise.dev)

        so multiply your value by 100, round it and then divide by 100...

        HISE Development for hire.
        www.channelrobot.com

        Y 1 Reply Last reply Reply Quote 0
        • Y
          yall @Lindon
          last edited by

          @Lindon
          what an idiot I am. I didn't put the /100 in the right place ^^ thank you it works

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          24

          Online

          1.7k

          Users

          11.8k

          Topics

          103.1k

          Posts