✅ Quickest way to get a number of decimal places based on an int?

For example, if i input 3 then the output would be 0.001 (3 decimal places to the right) I could divide the value by 10 for n amount of times but was hoping there may be a cleaner and easier way?
2 Replies
Anton
Anton3y ago
Math.Pow(0.1, n) or Math.Pow(10, -n)
Limited Past
Limited PastOP3y ago
thanks you 😄 exactly what i was after

Did you find this page helpful?