A vanilla lerp function, 'nuff said.
Add this to your application's shard.yml
:
dependencies:
lerp:
github: scottyfillups/lerp
require "lerp"
include Lerp
# Prints 23
puts lerp(0, 100, 0.23)
# Prints 59
puts lerp(25, 75, 0.68).as(Int32)
The include Lerp
isn't necessary, just be aware your function calls will be Lerp::lerp(...)
- Fork it (https://github.com/ScottyFillups/lerp/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
- ScottyFillups Philip Scott - creator, maintainer