The .NET Framework gives you the Math class, which has a ton of methods and properties that you can use. The Abs function will convert negative numbers to positive (and leave positive numbers alone), ...