This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
1.0.0 1.0.1
bounding box operations
version 1.0.2
license BSD3
native-modules False
elm-version 0.18.0 <= v < 0.19.0
Tag 1.0.2
Committed At 2017-07-01 14:18:54 UTC
elm-lang/core 5.1.1 <= v < 6.0.0 5.1.1
elm-community/maybe-extra 4.0.0 <= v < 5.0.0 4.0.0
elm-community/linear-algebra 3.1.1 <= v < 4.0.0 3.1.2

Modules

README

elm-bounding-box

Calculations on 2D bounding boxes

Quick Start

See here for the full documentation.

import BoundingBox exposing (fromCorners, inside)
import Math.Vector2 exposing (vec2)

-- use fromCorners to create a bounding box
bbox = 
    fromCorners (vec2 0 0) (vec2 10 10) 

-- contains checks whether a point lies in a box
member = 
    inside (vec2 5 5) bbox

This library (currently) uses the Math.Vector2.Vec2 type from elm-community/elm-linear-algebra to represent points in 2D space. The Vec2 module in this package re-exports conversion functions from and to this type for your convenience.