[{"name":"Interval","comment":"\r\n\r\n@docs Interval\r\n\r\n\r\n# Constructors\r\n\r\n@docs singleton, fromEndpoints, from, containingValues, aggregate, hull, intersection\r\n\r\n\r\n# Properties\r\n\r\n@docs endpoints, minValue, maxValue, midpoint, width\r\n\r\n\r\n# Interpolation\r\n\r\n@docs interpolate\r\n\r\n\r\n# Arithmetic\r\n\r\n@docs sin, cos\r\n\r\n\r\n# Queries\r\n\r\n@docs contains, intersects, isContainedIn\r\n\r\n","unions":[{"name":"Interval","comment":" Represents a finite, bounded interval with a minimum and maximum value, for\r\nexample the interval from 3 to 5.\r\n","args":[],"cases":[]}],"aliases":[],"values":[{"name":"aggregate","comment":" Construct an interval containing all of the intervals in the given list. If\r\nthe list is empty, returns `Nothing`.\r\n\r\n    Interval.aggregate\r\n        [ Interval.singleton 2\r\n        , Interval.from 3 4\r\n        ]\r\n    --> Just (Interval.from 2 4)\r\n\r\n    Interval.aggregate []\r\n    --> Nothing\r\n\r\n","type":"List.List Interval.Interval -> Maybe.Maybe Interval.Interval"},{"name":"containingValues","comment":" Construct an interval containing all values in the given list. If the list\r\nis empty, returns `Nothing`.\r\n\r\n    Interval.containingValues [ 2, 1, 3 ]\r\n    --> Just (Interval.from 1 3)\r\n\r\n    Interval.containingValues [ -3 ]\r\n    --> Just (Interval.singleton -3)\r\n\r\n    Interval.containingValues []\r\n    --> Nothing\r\n\r\n","type":"List.List Basics.Float -> Maybe.Maybe Interval.Interval"},{"name":"contains","comment":" Check if an interval contains a given value.\r\n\r\n    Interval.contains 0 (Interval.from -1 3)\r\n    --> True\r\n\r\n    Interval.contains 5 (Interval.from -1 3)\r\n    --> False\r\n\r\nThe minimum and maximum values of an interval are considered to be contained in\r\nthe interval, although if you are relying on this then there is a good chance\r\nyour code is vulnerable to numerical roundoff!\r\n\r\n    Interval.contains 3 (Interval.from -1 3)\r\n    --> True\r\n\r\n","type":"Basics.Float -> Interval.Interval -> Basics.Bool"},{"name":"cos","comment":" Get the image of cos(x) applied on the interval.\r\n\r\n    Interval.cos (Interval.from 0 (degrees 45))\r\n    --> Interval.from 0.7071 1\r\n\r\n    Interval.cos (Interval.from 0 pi)\r\n    --> Interval.from -1 1\r\n\r\n","type":"Interval.Interval -> Interval.Interval"},{"name":"endpoints","comment":" Get the endpoints of an interval (its minimum and maximum values) as a\r\ntuple. The first value will always be less than or equal to the second.\r\n\r\n    ( minValue, maxValue ) =\r\n        Interval.endpoints someInterval\r\n\r\nFor any interval,\r\n\r\n    Interval.endpoints interval\r\n\r\nis equivalent to (but more efficient than)\r\n\r\n    ( Interval.minValue interval\r\n    , Interval.maxValue interval\r\n    )\r\n\r\n","type":"Interval.Interval -> ( Basics.Float, Basics.Float )"},{"name":"from","comment":" Construct an interval containing the two given values (which can be provided\r\nin either order).\r\n\r\n    Interval.endpoints (Interval.from 2 5)\r\n    --> ( 2, 5 )\r\n\r\n    Interval.endpoints (Interval.from 5 2)\r\n    --> ( 2, 5 )\r\n\r\n","type":"Basics.Float -> Basics.Float -> Interval.Interval"},{"name":"fromEndpoints","comment":" Construct an interval from its endpoints (the minimum and maximum values of\r\nthe interval).\r\n\r\n    rgbRange =\r\n        Interval.fromEndpoints ( 0, 255 )\r\n\r\n    alphaRange =\r\n        Interval.fromEndpoints ( 0, 1 )\r\n\r\nThe two values should be given in order but will be swapped if\r\nnecessary to ensure a valid interval is returned:\r\n\r\n    Interval.endpoints (Interval.fromEndpoints ( 3, 2 ))\r\n    --> ( 2, 3 )\r\n\r\n","type":"( Basics.Float, Basics.Float ) -> Interval.Interval"},{"name":"hull","comment":" Construct an interval containing both of the given intervals.\r\n\r\n    firstInterval =\r\n        Interval.from 1 2\r\n\r\n    secondInterval =\r\n        Interval.from 3 6\r\n\r\n    Interval.hull firstInterval secondInterval\r\n    --> Interval.from 1 6\r\n\r\n","type":"Interval.Interval -> Interval.Interval -> Interval.Interval"},{"name":"interpolate","comment":" Interpolate between an interval's endpoints; a value of 0.0 corresponds to\r\nthe minimum value of the interval, a value of 0.5 corresponds to its midpoint\r\nand a value of 1.0 corresponds to its maximum value. Values less than 0.0 or\r\ngreater than 1.0 can be used to extrapolate.\r\n\r\n    Interval.interpolate (Interval.from -1 5) 0\r\n    --> -1\r\n\r\n    Interval.interpolate (Interval.from -1 5) 0.75\r\n    --> 3.5\r\n\r\n    Interval.interpolate (Interval.from -1 5) -0.5\r\n    --> -4\r\n\r\nNote that the interpolation is in fact from the minimum value to the maximum,\r\n_not_ \"from the first `Interval.from` argument to the second\":\r\n\r\n    Interval.interpolate (Interval.from 0 10) 0.2\r\n    --> 2\r\n\r\n    Interval.interpolate (Interval.from 10 0) 0.2\r\n    --> 2 -- not 8!\r\n\r\n","type":"Interval.Interval -> Basics.Float -> Basics.Float"},{"name":"intersection","comment":" Attempt to construct an interval containing all the values common to both\r\ngiven intervals. If the intervals do not intersect, returns `Nothing`.\r\n\r\n    Interval.intersection\r\n        (Interval.from 1 3)\r\n        (Interval.from 2 5)\r\n    --> Just (Interval.from 2 3)\r\n\r\n    Interval.intersection\r\n        (Interval.from 1 3)\r\n        (Interval.from 4 7)\r\n    --> Nothing\r\n\r\nIf the two intervals just touch, a singleton interval will be returned:\r\n\r\n    Interval.intersection\r\n        (Interval.from 1 3)\r\n        (Interval.from 3 5)\r\n    --> Just (Interval.singleton 3)\r\n\r\n","type":"Interval.Interval -> Interval.Interval -> Maybe.Maybe Interval.Interval"},{"name":"intersects","comment":" Check if two intervals touch or overlap (have any values in common).\r\n\r\n    Interval.from -5 5\r\n        |> Interval.intersects (Interval.from 0 10)\r\n    --> True\r\n\r\n    Interval.from -5 5\r\n        |> Interval.intersects (Interval.from 10 20)\r\n    --> False\r\n\r\nIntervals that just touch each other are considered to intersect (this is\r\nconsistent with `intersection` which will return a zero-width interval for the\r\nintersection of two just-touching intervals):\r\n\r\n    Interval.from -5 5\r\n        |> Interval.intersects (Interval.from 5 10)\r\n    --> True\r\n\r\nAs with `contains`, though, if you are relying on this then there is a good\r\nchance your code is vulnerable to numerical roundoff!\r\n\r\n","type":"Interval.Interval -> Interval.Interval -> Basics.Bool"},{"name":"isContainedIn","comment":" Check if the second interval is fully contained in the first.\r\n\r\n    Interval.from -5 5\r\n        |> Interval.isContainedIn (Interval.from 0 10)\r\n    --> False\r\n\r\n    Interval.from -5 5\r\n        |> Interval.isContainedIn (Interval.from -10 10)\r\n    --> True\r\n\r\nBe careful with the argument order! If not using the `|>` operator, the second\r\nexample would be written as:\r\n\r\n    Interval.isContainedIn (Interval.from -10 10)\r\n        (Interval.from -5 5)\r\n    --> True\r\n\r\n","type":"Interval.Interval -> Interval.Interval -> Basics.Bool"},{"name":"maxValue","comment":" Get the maximum value of an interval.\r\n\r\n    Interval.maxValue (Interval.from 1 3)\r\n    --> 3\r\n\r\n","type":"Interval.Interval -> Basics.Float"},{"name":"midpoint","comment":" Get the midpoint of an interval.\r\n\r\n    Interval.midpoint (Interval.from 1 5)\r\n    --> 3\r\n\r\n","type":"Interval.Interval -> Basics.Float"},{"name":"minValue","comment":" Get the minimum value of an interval.\r\n\r\n    Interval.minValue (Interval.from 1 3)\r\n    --> 1\r\n\r\n","type":"Interval.Interval -> Basics.Float"},{"name":"sin","comment":" Get the image of sin(x) applied on the interval.\r\n\r\n    Interval.sin (Interval.from 0 (degrees 45))\r\n    --> Interval.from 0 0.7071\r\n\r\n    Interval.sin (Interval.from 0 pi)\r\n    --> Interval.from 0 1\r\n\r\n","type":"Interval.Interval -> Interval.Interval"},{"name":"singleton","comment":" Construct a zero-width interval containing a single value.\r\n\r\n    Interval.singleton 3\r\n    --> Interval.fromEndpoints ( 3, 3 )\r\n\r\n","type":"Basics.Float -> Interval.Interval"},{"name":"width","comment":" Get the width of an interval.\r\n\r\n    Interval.width (Interval.from 1 5)\r\n    --> 4\r\n\r\n","type":"Interval.Interval -> Basics.Float"}],"binops":[]}]