abs Summary Get the absolute value of a number. Signatures Click on a signature to select it and view its documentation. public static int abs(int x) public static double abs(double x) Usage public static int abs(int x) public static double abs(double x) Returns The absolute value of the number. The absolute value of the number. Parameters x The number to get the absolute value of. Parameters x The number to get the absolute value of. Description Gets the absolute value for a signed, 32-bit integer value. Gets the absolute value for an IEEE 754 double floating-type value. Examples Basic Usage 123import System; int x = Math.abs(-100); // 100 Basic Usage 123import System; double x = Math.abs(-100d); // 100d Share HTML | BBCode | Direct Link