Limit values to 2 decimal places
-
Im trying to get parameter value displayed up to 2 decimal places, so i used
Math.round((currentValue) * 100) / 100
to achieve that and draw the values to a panel.
Most Values work, but some of them don't like in this example:
What am i missing? -
It seems, that these are all repeating decimal fractions...
-
Engine.doubleToString()
is the way to go.HiseSnippet 935.3ocsV0saSrCD1NstGR3GAn9.rpWkJUpRJ+cjPnFZZJJBZIvVPbGxYWuMVwq8p0d6oADRmKNmWGdE37bbtiq4FdCfwd2jcKDBPjHWT0wy7M9al7MiyfTU.SqUoHb8imjvP3KQ7mHMi5Nhxkn96ivWgbHUaXod4Gs2jDpVyBQX7JOzd.t9pH2mOs6dTAUFvJOBgdghGvdLOlaJOcPmGwEhCngri4wUh9Vc5GnjcUBUFvmUHsPIzfwzSXGQsgUifvq0KjaTo9FpgogX1SENwej5uj4w+BtlOTvrFsQ9PhxOF0cDWDNXZspQH7pCJq7Uxq70IGxC4yNurCbUmCuRDU6A3ZKhRs+EnDtBkVMmRWi3GjxSLkdr74hj9R3KjHJzpqRk7XQ09eLoqBhPZ1NlNlcPJXLCQya1p0Vdve17dMZz.52Zi2ozTuGIUCa6ceuoHOgY5phSTRvn4FNua.PJA7X5Pl36iH28FtagKEbIyKJSFX3JomR5xmEXpRzLXJpsfDKxXa13MMpmieaMCxkgclYis75IOARy1gpLngdrx2jxkmzzAYKuc1Dtp2B21BK.a9Jt1tTgXHnuZdd13HbEldjxvdhroiSMdaCuu1UTzb8UjMAKcttsB+zEAroLKdHKsZGwFHnLNubaseN4VPdSoRfJYeI27jDVg8AJQnUFY++uUbhJ5pVYZACgPMNQ5UJDo9BdHKEwgj7GDWKE4Hew.t2+9wOrK5482mZnSSCjQ3VRXoFtsXv6yNEVWjq8qS1moGaTIvj+ruHg8S+vK8rxMJG0YxLi+9oczlI1VyZt.Qw7vPAafRyss9J6wdOrtKwm+ZGyey5u6ge30+ytwUW0gPwzypt4SmEEwOysiJhKh0fzLoeLr5BguN44ZlWHKhlILd5wPdfogwrviUt3QUJt0xKt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