Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// approach(start, ending, difference);
- var start, ending, difference;
- start = argument0;
- ending = argument1;
- difference = argument2;
- var result;
- if (start < ending){
- result = min(start + difference, ending);
- }else{
- result = max(start - difference, ending);
- }
- return result;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement