floor Summary Rounds a number down. Usage public static double floor(double x) Returns The result of rounding down the number. Parameters x The number to round down. Description Rounds a number down. (Returns the floor of a number.) Examples Basic Usage 123456import System; Console.log(Math.floor(1)); // 1Console.log(Math.floor(2.5)); // 2Console.log(Math.floor(2.01)); // 2Console.log(Math.floor(2.9)); // 2 Share HTML | BBCode | Direct Link