netwire-5.0.0: Functional reactive programming library

MaintainerErtugrul Soeylemez <es@ertes.de>
Safe HaskellNone

FRP.Netwire.Move

Contents

Description

 

Synopsis

Calculus

derivative :: (RealFloat a, HasTime t s, Monoid e) => Wire s e m a aSource

Time derivative of the input signal.

  • Depends: now.
  • Inhibits: at singularities.

integralSource

Arguments

:: (Fractional a, HasTime t s) 
=> a

Integration constant (aka start value).

-> Wire s e m a a 

Integrate the input signal over time.

  • Depends: before now.

integralWithSource

Arguments

:: (Fractional a, HasTime t s) 
=> (w -> a -> a)

Correction function.

-> a

Integration constant (aka start value).

-> Wire s e m (a, w) a 

Integrate the left input signal over time, but apply the given correction function to it. This can be used to implement collision detection/reaction.

The right signal of type w is the world value. It is just passed to the correction function for reference and is not used otherwise.

The correction function must be idempotent with respect to the world value: f w (f w x) = f w x. This is necessary and sufficient to protect time continuity.

  • Depends: before now.