Guest User

Untitled

a guest
Sep 8th, 2015
943
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /// approach(start, ending, difference);
  2. var start, ending, difference;
  3.  
  4. start = argument0;
  5. ending = argument1;
  6. difference = argument2;
  7.  
  8. var result;
  9.  
  10. if (start < ending){
  11. result = min(start + difference, ending);
  12. }else{
  13. result = max(start - difference, ending);
  14. }
  15.  
  16. return result;
RAW Paste Data