Safe Haskell | None |
---|---|

Language | Haskell2010 |

- newtype Measured n a = Measured {
- unmeasure :: (n, n, n) -> a

- type Measure n = Measured n n
- fromMeasured :: Num n => n -> n -> Measured n a -> a
- output :: n -> Measure n
- local :: Num n => n -> Measure n
- global :: Num n => n -> Measure n
- normalized :: Num n => n -> Measure n
- normalised :: Num n => n -> Measure n
- scaleLocal :: Num n => n -> Measured n a -> Measured n a
- atLeast :: Ord n => Measure n -> Measure n -> Measure n
- atMost :: Ord n => Measure n -> Measure n -> Measure n

# Documentation

'Measured n a' is an object that depends on `local`

, `normalized`

and `global`

scales. The `normalized`

and `global`

scales are
calculated when rendering a diagram.

For attributes, the `local`

scale gets multiplied by the average
scale of the transform.

Profunctor Measured Source # | |

Monad (Measured n) Source # | |

Functor (Measured n) Source # | |

Applicative (Measured n) Source # | |

Distributive (Measured n) Source # | |

Representable (Measured n) Source # | |

Additive (Measured n) Source # | |

Floating a => Floating (Measured n a) Source # | |

Fractional a => Fractional (Measured n a) Source # | |

Num a => Num (Measured n a) Source # | |

Semigroup a => Semigroup (Measured n a) Source # | |

Monoid a => Monoid (Measured n a) Source # | |

HasOrigin t => HasOrigin (Measured n t) Source # | |

(InSpace v n t, Transformable t, HasLinearMap v, Floating n) => Transformable (Measured n t) Source # | |

Qualifiable a => Qualifiable (Measured n a) Source # | |

HasStyle b => HasStyle (Measured n b) Source # | |

Juxtaposable a => Juxtaposable (Measured n a) Source # | |

MonadReader (n, n, n) (Measured n) Source # | |

type Rep (Measured n) Source # | |

type N (Measured n a) Source # | |

type V (Measured n a) Source # | |

fromMeasured :: Num n => n -> n -> Measured n a -> a Source #

fromMeasured globalScale normalizedScale measure -> a

local :: Num n => n -> Measure n Source #

Local units are scaled by the average scale of a transform.

normalized :: Num n => n -> Measure n Source #

Normalized units get scaled so that one normalized unit is the size of the final diagram.

normalised :: Num n => n -> Measure n Source #

Just like `normalized`

but spelt properly.

scaleLocal :: Num n => n -> Measured n a -> Measured n a Source #

Scale the local units of a `Measured`

thing.