Skip to content
Advertisement

Distance between two integer values

is there a simple method to calculate the distance between two values e.g. 10 and 30 which will result to 20. Currently I do it as follows:

Advertisement

Answer

The Absolute value function does the trick.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement