Skip to content

Instantly share code, notes, and snippets.

@markdekuijer
Created January 22, 2019 08:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markdekuijer/5dc2379dcf6a84dfbec7153d17f69b63 to your computer and use it in GitHub Desktop.
Save markdekuijer/5dc2379dcf6a84dfbec7153d17f69b63 to your computer and use it in GitHub Desktop.
float Lerp(float val1, float val2, float t)
{
return (1 - t) * val1 + t * val2;
}
xyz Lerp(xyz pos1, xyz pos2, float t)
{
return x=Lerp(pos1.x,pos2.x,t)
y=Lerp(pos1.y, pos2.y,t)
z=Lerp(pos1.z, pos2.z,t)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment