The abs() function is used to find and return the absolute value (magnitude) of an integer. It disregards any negative sign attached to it and always gives back its positive equivalent.
Related terms
max(int a, int b): This method returns the larger of two given integers.
min(int a, int b): This method returns the smaller of two given integers.