lerp

A vanilla lerp function for crystal 💎

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

Repository

lerp

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 0
  • almost 7 years ago
  • September 19, 2018
License

MIT License

Links
Synced at

Sat, 19 Jul 2025 23:51:08 GMT

Languages