Parameters or Arguments
number The number which will be rounded to a 32-bit single precision go with the flow number.
The fround() characteristic returns the variety rounded to a 32-bit single precision float value.
Math is a placeholder object that consists of mathematical features and constants of which fround() is one of these functions.
console.log(Math.fround(32)); console.log(Math.fround(8.1)); console.log(Math.fround(-4.2));
In this example, we have invoked the fround() function the use of the Math class.
We have written the output of the fround() feature to the net browser console log, for demonstration purposes, to exhibit what the fround() function returns.
The following will be output to the web browser console log:
32 8.100000381469727 -4.199999809265137
In this example, the first output to the console log lower back 32 which is the rounded 32-bit single precision glide representation of 32.
The 2d output to the console log again 8.100000381469727 which is the rounded 32-bit single precision float representation of 8.1.
The 1/3 output to the console log returned -4.199999809265137 which is the rounded 32-bit single precision flow illustration of -4.2.