Swiftpack.co - egecavusoglu/Swease as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by egecavusoglu.
egecavusoglu/Swease v0.0.1
Easing functions in Swift, simplified.
⭐️ 0
🕓 1 year ago
.package(url: "https://github.com/egecavusoglu/Swease.git", from: "v0.0.1")

Swease

This project aims to provide easing functions in swift in the simplest way possible.

Easing functions provide us to map an input range to an output range in various ways to create mathematical relations to use in our app. They are commonly used in visual animations and transitions.

Easing functions specify the rate of change of a parameter over time. - easings.net

See easings.net for a more detailed look into specifics each easing function.

How to use

  1. Define an input and an output range.
let inputRange: ClosedRange<Double> = 0.0...1.0
let outputRange: ClosedRange<Double> = 0.0...10.0
  1. Initialize Swease
let swease = Swease(inputRange: inputRange, outputRange: outputRange) 
  1. Map values
swease.map(value: 0.5, easing: .ease_in) // = 1.25

GitHub

link
Stars: 0
Last commit: 47 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics