Discord
Login
Community
DARK THEME

how would i round a value but still have it show 1.1 or 1.01

when i round a value then add 0.1 it doesnt show


value = round(value)

value+=0.1


let roundedValue = Math.round(value);
let newValue = roundedValue + 0.1;
console.log(newValue); // Outputs: 8.1 if value was 7.5```


Try that and see if it works. It is in javascript, but the idea is creating a new variable to hold the new value

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community