twentefp-eventloop-graphics-0.1.0.3: Used as Lab Assignments Environment at Univeriteit Twente

Copyright(c) Sebastiaan la Fleur, 2014
LicenseBSD3
Maintainersebastiaan.la.fleur@gmail.com
Stabilityexperimental
PortabilityAll
Safe HaskellSafe-Inferred
LanguageHaskell98

FPPrac.Graphics.NormalizeNumber

Description

In the EventLoop module, Floats are used to express positions and other characteristics. As that package is also used in the functional programming lab at the University of Twente, compatibility with the FPPrac module is needed. That module expresses a Number type which abstracts from Int and Double types. This module is used to normalize both the Number type and the original Num class instances defined in Haskell.

Synopsis

Documentation

class Num a => NormalizeNumber a where Source

Class to express that the instance a is able to be normalized to a Float.

Methods

normalize :: a -> Float Source

The function that can be used to normalize a to a Float.

Instances

NormalizeNumber Double

How to normalize a Double

NormalizeNumber Float

How to normalize a Float

NormalizeNumber Int

How to normalize an Int

NormalizeNumber Integer

How to normalize an Integer

NormalizeNumber Number

How to normalize a Number. This is definied in FPPrac.Prelude.Number in the twentefp-number package