Take for instance this decimal value:
let myDecimal = 117.049701384;
I need to display 117.05 to the user without altering the original precise value above.
I am aiming to replicate Excel's behavior with decimals, showing a number with two decimal places while preserving all the decimals for calculations.
The goal is to maintain a clean UI by avoiding lengthy decimal numbers, yet ensuring precision in mathematical operations. I could duplicate variables, but that seems cumbersome and tedious.
Is this achievable in Javascript?
This application utilizes Javascript and VueJS 2.x.
Thank you in advance.