h3-core-0.0.1: Core library for h3

Safe HaskellNone
LanguageHaskell2010

Data.H3.Utils

Synopsis

Documentation

looseLabels :: (Ord a, Num a, Fractional a, Floating a, RealFrac a) => LabelCount -> (a, a) -> (NonEmpty a, Integer) Source #

Generate a list of "nice" numbers that contain the given interval.

Based on "Nice numbers for label graphs" by Paul Heckbert. http://www.realtimerendering.com/resources/GraphicsGems/gems/Label.c

newtype LabelCount Source #

How many labels to generate

Constructors

LabelCount Integer 

data RoundingMode Source #

Constructors

Round 
DontRound 

nicenum :: (Ord a, Num a, Fractional a, Floating a, RealFrac a) => RoundingMode -> a -> a Source #

linear :: (Fractional a, Eq a) => (a, a) -> (a, a) -> a -> a Source #

computeMidpoint :: (Fractional x, Num x, Foldable1 f) => f x -> x Source #

viewBox :: IsString s => Extent Double -> Extent Double -> s Source #

Generate a value for an SVG "viewBox" attribute based on the extents of the x- and y-axis.