round Summary Rounds a value to the nearest whole number. Usage public static double round(double x) Returns A whole number value representing the rounded value. Parameters x The value to round. Description Rounds a value to the nearest whole number. Examples Basic Usage 12345import System; Console.log(Math.round(2.2)); // 2Console.log(Math.round(2.5)); // 3Console.log(Math.round(2.9)); // 3 Share HTML | BBCode | Direct Link