ease-0.1.0.2: Robert Penner's easing equations

Safe HaskellSafe
LanguageHaskell2010

Ease

Contents

Description

These are the standard easing equations. All of the functions in this module expect a fractional between 0 and 1, and give back a fractional between 0 and 1. Some eases require some configuration. These options are provided via types with default instances.

Synopsis

Documentation

type Ease a = Fractional a => a -> a Source #

An Ease is just a function from some fractional to another fractional. Eases expects a term between 0 and 1 and gives a term between 0 and 1. This is not statically checked, but maybe should be.

Back

newtype Overshoot a Source #

Constructors

Overshoot a 
Instances
Fractional a => Default (Overshoot a) Source # 
Instance details

Defined in Ease

Methods

def :: Overshoot a #

Bounce

Circ

Elastic

newtype Amplitude a Source #

Constructors

Amplitude a 
Instances
Num a => Default (Amplitude a) Source # 
Instance details

Defined in Ease

Methods

def :: Amplitude a #

data Period a Source #

Constructors

Period a 
PeriodDefault 
Instances
Default (Period a) Source # 
Instance details

Defined in Ease

Methods

def :: Period a #

elasticIn :: forall a. (Eq a, Ord a, Floating a) => Amplitude a -> Period a -> Ease a Source #

elasticOut :: forall a. (Eq a, Ord a, Floating a) => Amplitude a -> Period a -> Ease a Source #

elasticInOut :: forall a. (Eq a, Ord a, Floating a) => Amplitude a -> Period a -> Ease a Source #

Exponential

expoIn :: (Eq a, Floating a) => Ease a Source #

expoOut :: (Eq a, Floating a) => Ease a Source #

expoInOut :: (Eq a, Ord a, Floating a) => Ease a Source #

Linear

Quad

Cubic

Quart

Quint

Sine

Re-export

def :: Default a => a #

The default value for this type.