Math.max(5, 10); // Outputs 10 Math.min(5, 10); // Outputs 5 Math.sqrt(64); // Outputs 8.0 Math.abs(-4.7); // Outputs 4.7 Math.random(); // returns a random number between 0.0 (inclusive), and 1.0 (exclusive) (int)(Math.random() * 101); // 0 to 100
Math.max(5, 10); // Outputs 10 Math.min(5, 10); // Outputs 5 Math.sqrt(64); // Outputs 8.0 Math.abs(-4.7); // Outputs 4.7 Math.random(); // returns a random number between 0.0 (inclusive), and 1.0 (exclusive) (int)(Math.random() * 101); // 0 to 100