wumpus-basic-0.15.0: Basic objects and system code built on Wumpus-Core.

PortabilityGHC
Stabilityunstable
Maintainerstephen.tetley@gmail.com

Wumpus.Basic.Kernel.Base.ScalingContext

Description

Scaling in X and Y

** WARNING ** - half baked.

Synopsis

Documentation

data ScalingContext ux uy u Source

ScalingContext is a dictionary of two functions for scaling in X and Y.

Constructors

ScalingContext 

Fields

scale_in_x :: ux -> u
 
scale_in_y :: uy -> u
 

scaleX :: ScalingContext ux uy u -> ux -> uSource

scaleY :: ScalingContext ux uy u -> uy -> uSource

scalePt :: ScalingContext ux uy u -> ux -> uy -> Point2 uSource

scaleVec :: ScalingContext ux uy u -> ux -> uy -> Vec2 uSource

unitX :: Num ux => ScalingContext ux uy u -> uSource

unitY :: Num uy => ScalingContext ux uy u -> uSource

uniformScaling :: Num u => u -> ScalingContext u u uSource

Build a ScalingContext where both X and Y are scaled by the same uniform step.

The dimensions (types) of the ScalingContext are unified - the output type and the input types are all the same.

coordinateScaling :: Num u => u -> u -> ScalingContext Int Int uSource

Build a ScalingContext for scaling Int coordinates.

The scaling factors in X and Y can be different sizes.