A vanilla lerp function for crystal 💎
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
spec
src
.editorconfig
.gitignore
.travis.yml
LICENSE
README.md
shard.yml

README.md

lerp

Build Status

A vanilla lerp function, 'nuff said.

Installation

Add this to your application's shard.yml:

dependencies:
  lerp:
    github: scottyfillups/lerp

Usage

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(...)

Contributing

  1. Fork it (https://github.com/ScottyFillups/lerp/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors