Created
May 15, 2016 23:02
-
-
Save markhc/e247f71751ad843d48ce2b84deb30568 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
bool PerformStep( | |
QAngle src, | |
QAngle dst, | |
float maxStep, | |
SourceSDK::QAngle &res) | |
{ | |
Vector delta = dst - src; | |
res = src; | |
if(delta.Length() > maxStep) { | |
res += (delta.Normalized() * maxStep); | |
return false; | |
} else { | |
res = dst; | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment