abs

//If it's negative, make it positive
float abs(float value) {

 //If negative, multiply by -1
 if(value < 0) {
     value *= -1;
 }

 return value;
}

Algorithm for abs:

  1. If the value is less than 0, multiply it by negative 1.
  2. Return the value.
  3. End function.