The Math fround() static method returns the nearest 32-bit single precision float representation of a number.
console.log(Math.fround(5.5));
// 5.5
console.log(Math.fround(5.05));
// 5.050000190734863
console.log(Math.fround(5));
// 5
console.log(Math.fround(-5.05));
// -5.050000190734863