gore-and-ash-1.1.0.1: Core of FRP game engine called Gore&Ash

Copyright(c) 2013 Ertugrul Soeylemez
LicenseBSD3
MaintainerErtugrul Soeylemez <es@ertes.de>
Safe HaskellNone
LanguageHaskell2010

FRP.Netwire.Move

Contents

Description

 

Synopsis

Calculus

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

Time derivative of the input signal.

  • Depends: now.
  • Inhibits: at singularities.

integral Source

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.

integralWith Source

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.