Skip to content

DanielPetelin/Interpolation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Interpolation

I found the idea for this project in C #. When creating games, it is sometimes necessary to linearly interpolate between two values. This is done using the Lerp function. Linear interolation is the search for a value that is a certain percentage between two values. For example, we could linearly interpolate between 3 and 5 by 50% to get 4. This is because 4 is 50% of the path between 3 and 5. I decided to recreate this function in JavaScript. This function takes three parameters: the first "from" which to interpolate, the second "to" which must be interpolated, and the third shows "how far" to interpolate. In my example, 0.5 will be 50% => 1 = 100%, and 0 => 0%, etc. Function - https://danielpetelin.github.io/Interpolation/

Releases

No releases published

Packages

No packages published