silverdiamond Posted September 13, 2023 Share Posted September 13, 2023 If I have a var: var volt = 1.234567 but I would like to print to 2 decimal places, how do I do that for the case below? print("Volts: "+volt) Link to comment Share on other sites More sharing options...
0 artvvb Posted September 13, 2023 Share Posted September 13, 2023 Hi @silverdiamond The following should work: Quote print("Volts: "+volt.toFixed(2)) WaveForms' Script Editor is based on JavaScript. Thanks, Arthur silverdiamond 1 Link to comment Share on other sites More sharing options...
Question
silverdiamond
If I have a var:
var volt = 1.234567
but I would like to print to 2 decimal places, how do I do that for the case below?
print("Volts: "+volt)
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now