Created
September 14, 2020 07:46
-
-
Save harpwood/8527de8c13cce174a989c1c1c8f64340 to your computer and use it in GitHub Desktop.
Move target to endpoint by given amount
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// @func approach(target, endpoint, amount); | |
/// @description move target to endpoint by given amount | |
/// @arg target | |
/// @arg endpoint | |
/// @arg amount | |
if(argument0 < argument1) return min(argument0 + argument2, argument1); | |
else return max(argument0 - argument2, argument1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment