[
    {
        "name": "Matrix4",
        "comment": "\n\n\n## Matrix4\n\nThis module deals mostly with 3D transformation matrices.\n\nWe can represent a transformation of a 3D vector as a multiplication with a 4x4 matrix\nby writing the vector in homogeneous coordinates.\n\nHere are a few useful links if you want to understand the math behind this library.\n\n<http://learnopengl.com/#!Getting-started/Transformations>\n<http://www.codinglabs.net/article_world_view_projection_matrix.aspx>\n<http://www.euclideanspace.com/maths/geometry/affine/index.htm>\n\n@docs Float4x4, Mat4\n\n\n## General operations\n\n@docs map, map2, foldl, foldr\n\n\n## General math\n\n@docs identity, fromRows, fromColumns\n\n@docs add, sub, mul, elementWiseMul, mulByConst, transpose, mulVector\n\n\n## Transformation matrices\n\nA transformation matrix represents an arbitrary transform on a 3d vector.\nTo transform a 3d vector v, we multiply it with a 4x4 transformation matrix M.\nTo do that we need to write v in homogeneous coordinates,\nthen transform the result back to normal coordinates.\n\n        |v|   |v'|\n    M * |1| = |w |,\n    res = v'/w\n\nThese transformations can be chained, e.g. you can apply several transformations in series.\nNote that to understand how a vector will be transformed, it helps to read it backwards:\n\n    T*R*S*v\n\nMeans that `v` will be scaled by the matrix `S`, then rotated by `R` and finally translated by `T`.\n\n@docs transform\n\n\n### Affine transformations\n\nThese represent a transform that preserves shapes, e.g. translations, rotations and scaling.\nThese are composed of a 3x3 rotation and scale matrix M and a translation vector t:\n\n    |M t|\n    |0 1|\n\n@docs makeRotate, makeScale, makeTranslate, makeTransform\n@docs rotate, scale, translate, transformBy\n\nTODO: does it make sense for these to be post multiplied?\nThis means that currently these operations will be done before doing the transform,\nmeaning they will act as local transformations.\nHowever this makes creating a composed transformation weird,\nas the order of operations might be counter-intuitive!\nE.g. `identity |> translate |> rotate` actually corresponds to `I*T*R`\nwhich means rotate first, then translate.\n\n@docs makeLookAt, makeBasis\n\n\n#### Operations on affine transforms\n\nThese can speed up some calculations, but are only correct if actually used with affine transforms.\n\n@docs transformAffine, mulAffine, inverseRigidBodyTransform\n\n\n### Cameras\n\nCameras can also be represented as a transformation matrix.\n**NOTE**: These transforms are generally **not** affine transforms!\n\nCamera projection matrices map their view of the scene into a 2x2x2 cube.\nMath heavy reference: <http://www.songho.ca/opengl/gl_projectionmatrix.html>\n\n@docs makeFrustum, makePerspective, makeOrtho, makeOrtho2d\n\n\n## Other\n\n@docs maxNorm, almostEqual\n\n",
        "unions": [],
        "aliases": [
            {
                "name": "Float4x4",
                "comment": " ",
                "args": [],
                "type": "Mat4 Float"
            },
            {
                "name": "Mat4",
                "comment": " ",
                "args": [
                    "a"
                ],
                "type": "( Vec4 a, Vec4 a, Vec4 a, Vec4 a )"
            }
        ],
        "values": [
            {
                "name": "add",
                "comment": " `A + B`\n",
                "type": "Float4x4 -> Float4x4 -> Float4x4"
            },
            {
                "name": "almostEqual",
                "comment": " This checks whether `|A - B| <= eps`.\n\n    almostEqual eps a b\n\nThis is useful for testing, see the tests of this library for how this makes testing easy.\n\nSince any definition of a norm can be used for this, it uses the simple `maxNorm`\n\n",
                "type": "Float -> Float4x4 -> Float4x4 -> Bool"
            },
            {
                "name": "elementWiseMul",
                "comment": " Element wise multiplication. Also called Hadamard product, Schur product or entrywise product.\n\n    A .* B\n\n",
                "type": "Float4x4 -> Float4x4 -> Float4x4"
            },
            {
                "name": "foldl",
                "comment": " ",
                "type": "(elem -> acc -> acc) -> acc -> Mat4 elem -> acc"
            },
            {
                "name": "foldr",
                "comment": " ",
                "type": "(elem -> acc -> acc) -> acc -> Mat4 elem -> acc"
            },
            {
                "name": "fromColumns",
                "comment": "\n\n    fromColumns a b c d == transpose (a,b,c,d)\n",
                "type": "Float4 -> Float4 -> Float4 -> Float4 -> Float4x4"
            },
            {
                "name": "fromRows",
                "comment": "\n\n    fromRows a b c d == (a,b,c,d)\n",
                "type": "Float4 -> Float4 -> Float4 -> Float4 -> Float4x4"
            },
            {
                "name": "identity",
                "comment": " The identity matrix. This is also a valid transformation matrix which doesn't do anything.\n\n    I = |1 0 0 0|\n        |0 1 0 0|\n        |0 0 1 0|\n        |0 0 0 1|\n\n",
                "type": "Float4x4"
            },
            {
                "name": "inverseRigidBodyTransform",
                "comment": " Calculate the inverse of a rigid body transform.\nThis a special form of affine transform, that is only composed of\nrotations and translations.\n\n    | R t |^-1 = | R^T -R^T*t |\n    | 0 1 |      | 0    1     |\n\nIt's usually easier and faster to just do the construction of the matrix you want to invert in reverse, e.g.\n\n    inverseRigidBodyTransform (makeRotate 1.2 (0,1,0)) == makeRotate -1.2 (0,1,0)\n    inverseRigidBodyTransform (makeScale (2,3,1)) == makeScale (1/2,1/3,1)\n\n",
                "type": "Float4x4 -> Float4x4"
            },
            {
                "name": "makeBasis",
                "comment": " Create an affine transform from 3 orthogonal (perpendicular) vectors.\nMake sure xAxis yAxis zAxis are really orthonormal,\notherwise you won't get an affine transform!\nOnly use this if you know what you are doing.\n\n    makeBasis (1, 0, 0) (0, 1, 0) (0, 0, 1) == identity\n\n",
                "type": "Float3 -> Float3 -> Float3 -> Float4x4"
            },
            {
                "name": "makeFrustum",
                "comment": " Creates a matrix for a projection frustum.\n\n    makeFrustum left right bottom top znear zfar\n\n<http://www.songho.ca/opengl/gl_projectionmatrix.html>\n\nNaN warning: if left = right or bottom = top or znear = zfar\n\n",
                "type": "Float -> Float -> Float -> Float -> Float -> Float -> Float4x4"
            },
            {
                "name": "makeLookAt",
                "comment": " Create a transform that makes a 3D object look at the target.\nVery often used with cameras to make them look at a target.\nThe up vector is usually (0, 1, 0), e.g. the y-axis. (some people also use the z-axis)\n\n    makeLookAt cameraPosition target (0, 1, 0)\n\nNaN warning: if cameraPosition = target\n\n",
                "type": "Float3 -> Float3 -> Float3 -> Float4x4"
            },
            {
                "name": "makeOrtho",
                "comment": " This creates an orthographic projection.\n\n    makeOrtho left right bottom top znear zfar\n\nNaN warning: if left = right or bottom = top or znear = zfar\n\n",
                "type": "Float -> Float -> Float -> Float -> Float -> Float -> Float4x4"
            },
            {
                "name": "makeOrtho2d",
                "comment": " Same as `makeOrtho`, but with `znear = -1` and `zfar = 1` set.\n\n    makeOrtho2d left right bottom top\n\nNaN warning: if left = right or bottom = top\n\n",
                "type": "Float -> Float -> Float -> Float -> Float4x4"
            },
            {
                "name": "makePerspective",
                "comment": " Creates a matrix for a perspective projection.\n\n    makePerspective fovy aspect znear zfar\n\nfovy - field of view in the y axis, in degrees\naspect - aspect ratio\nznear - the near z distance of the projection\nzfar - the far z distance of the projection\n\nNaN warning: if znear = zfar or fovy = 720+n*1440\n\n",
                "type": "Float -> Float -> Float -> Float -> Float4x4"
            },
            {
                "name": "makeRotate",
                "comment": " Creates a rotation matrix `R`.\nThis represents a rotation of `angle` degrees (in radians)\naround the vector specified by `axis`.\nThe rotation is specified according to the right hand rule.\n\nNaN warning: if axis = 0\n\n",
                "type": "Float -> Float3 -> Float4x4"
            },
            {
                "name": "makeScale",
                "comment": " Create a scale matrix `S`.\n",
                "type": "Float3 -> Float4x4"
            },
            {
                "name": "makeTransform",
                "comment": " Creates an affine transform given a translation, a scale, a rotation and a pivot vector.\nThe pivot is the 'center' of the rotation and scaling operation.\n\n    makeTransform translation scale angle rotationAxis pivot\n\nNaN warning: if rotationAxis = 0\n\n",
                "type": "Float3 -> Float3 -> Float -> Float3 -> Float3 -> Float4x4"
            },
            {
                "name": "makeTranslate",
                "comment": " Create a translation matrix `T`\n",
                "type": "Float3 -> Float4x4"
            },
            {
                "name": "map",
                "comment": " ",
                "type": "(a -> b) -> Mat4 a -> Mat4 b"
            },
            {
                "name": "map2",
                "comment": " ",
                "type": "(a -> b -> c) -> Mat4 a -> Mat4 b -> Mat4 c"
            },
            {
                "name": "maxNorm",
                "comment": " The max norm. This is the biggest element of a matrix.\nUseful for fuzz testing.\n",
                "type": "Float4x4 -> Float"
            },
            {
                "name": "mul",
                "comment": " `A*B`\n",
                "type": "Float4x4 -> Float4x4 -> Float4x4"
            },
            {
                "name": "mulAffine",
                "comment": " Multiply two affine transforms. Same as `mul` but a bit faster.\nOnly correct if used with an affine transform!\n",
                "type": "Float4x4 -> Float4x4 -> Float4x4"
            },
            {
                "name": "mulByConst",
                "comment": " `a*A`\n",
                "type": "Float -> Float4x4 -> Float4x4"
            },
            {
                "name": "mulVector",
                "comment": " `A*v`\n",
                "type": "Float4x4 -> Float4 -> Float4"
            },
            {
                "name": "rotate",
                "comment": " Rotate an affine transform by an angle along the given axis.\n\nNaN warning: if axis = 0\n\n",
                "type": "Float -> Float3 -> Float4x4 -> Float4x4"
            },
            {
                "name": "scale",
                "comment": " Scale an affine transform with the given vector.\nSame as `M*makeScale(s)`\n",
                "type": "Float3 -> Float4x4 -> Float4x4"
            },
            {
                "name": "sub",
                "comment": " `A - B`\n",
                "type": "Float4x4 -> Float4x4 -> Float4x4"
            },
            {
                "name": "transform",
                "comment": " Transform a vector by an arbitrary transformation matrix.\nIn math terms, we do:\n\n    |v'| = A*|v|  v'/w\n    |w |     |1|,\n\nNaN/infinity warning: if w = 0\n\n",
                "type": "Float4x4 -> Float3 -> Float3"
            },
            {
                "name": "transformAffine",
                "comment": " Same as `transform`, but a bit faster. Only correct if used with an affine transform!\n",
                "type": "Float4x4 -> Float3 -> Float3"
            },
            {
                "name": "transformBy",
                "comment": " Transform a vector by the transformation specified in the parameters\n\n    transformBy translation scale angle rotationAxis pivot v\n\n",
                "type": "Float3 -> Float3 -> Float -> Float3 -> Float3 -> Float3 -> Float3"
            },
            {
                "name": "translate",
                "comment": " Translate an affine transform by the given vector.\nSame as `M*makeTranslate(t)`\n",
                "type": "Float3 -> Float4x4 -> Float4x4"
            },
            {
                "name": "transpose",
                "comment": " The transpose.\nFlips a matrix along it's diagonal.\n\n`A^T`\n\n",
                "type": "Float4x4 -> Float4x4"
            }
        ],
        "binops": []
    },
    {
        "name": "Vector4",
        "comment": "\n\n\n## Vector4\n\n@docs Float4, Vec4\n\n@docs fromV3, setX, setY, setZ, setW, getX, getY, getZ, getW, map, map2, foldl, foldr\n\n@docs add, sub, negate, scale, divideBy\n\n@docs dot, length, lengthSquared, normalize, directionFromTo, distance, distanceSquared, angle\n\n",
        "unions": [],
        "aliases": [
            {
                "name": "Float4",
                "comment": " ",
                "args": [],
                "type": "Vec4 Float"
            },
            {
                "name": "Vec4",
                "comment": " ",
                "args": [
                    "a"
                ],
                "type": "( a, a, a, a )"
            }
        ],
        "values": [
            {
                "name": "add",
                "comment": " `v + w`\n\n    add (2,4,1,-2) (3,-6,2,1) == (5,-2,3,-1)\n\n",
                "type": "Float4 -> Float4 -> Float4"
            },
            {
                "name": "angle",
                "comment": " The angle between two vectors. The angle is in radians.\n\n`acos((v dot w)/(|v|*|w|))`\n\n    angle (-1,-1,2,0) (2,2,2,0) == pi/2    -- or 90°\n\nNaN warning: if v = 0 or w = 0\n\n",
                "type": "Float4 -> Float4 -> Float"
            },
            {
                "name": "directionFromTo",
                "comment": " A unit vector pointing from `v` to `w`\n\n`(w - v)/|w - v|`\n\n    directionFromTo (5,1,2,4) (7,5,3,6) == (2/5,4/5,1/5,2/5)\n\nNaN warning: if v = w\n\n",
                "type": "Float4 -> Float4 -> Float4"
            },
            {
                "name": "distance",
                "comment": " Calculates the distance from `v` to `w`.\n\n`|v - w| = |w - v|`\n\n    distance (7,5,3,6) (5,1,2,4) == 5\n\n",
                "type": "Float4 -> Float4 -> Float"
            },
            {
                "name": "distanceSquared",
                "comment": " The squared distance. This is slightly faster.\n\n`|v - w|^2`\n\n    distanceSquared (3,0,2,1) (0,2,4,1) == 17\n\n",
                "type": "Float4 -> Float4 -> Float"
            },
            {
                "name": "divideBy",
                "comment": " `v/a`\n\n    divideBy (3/2) (3,12,6,9) == (2,8,4,6)\n\nNaN/infinity warning: if a = 0\n\n",
                "type": "Float -> Float4 -> Float4"
            },
            {
                "name": "dot",
                "comment": " `v dot w`\n\nThe **dot product** of two vectors. Also called **scalar product** or **inner product**.\n\nIt links the length and angle of two vectors.\n\n`v dot w = |v|*|w|*cos(phi)`\n\n    dot (1,2,2,3) (3,3,2,2) == 1*3 + 2*3 + 2*2 + 3*2 == 19\n\n",
                "type": "Float4 -> Float4 -> Float"
            },
            {
                "name": "foldl",
                "comment": "\n\n    foldl (\\elem acc -> acc + elem^2) 0 (2,4,1,2) == 25\n",
                "type": "(elem -> acc -> acc) -> acc -> Vec4 elem -> acc"
            },
            {
                "name": "foldr",
                "comment": "\n\n    foldr (::) [] (1,2,3,5) == [1,2,3,5]\n",
                "type": "(elem -> acc -> acc) -> acc -> Vec4 elem -> acc"
            },
            {
                "name": "fromV3",
                "comment": "\n\n    fromV3 (1,2,3) 1 == (1,2,3,1)\n",
                "type": "Vec3 a -> a -> Vec4 a"
            },
            {
                "name": "getW",
                "comment": " ",
                "type": "Vec4 a -> a"
            },
            {
                "name": "getX",
                "comment": " ",
                "type": "Vec4 a -> a"
            },
            {
                "name": "getY",
                "comment": " ",
                "type": "Vec4 a -> a"
            },
            {
                "name": "getZ",
                "comment": " ",
                "type": "Vec4 a -> a"
            },
            {
                "name": "length",
                "comment": " The length of a vector. Also known as magnitude or norm.\n\n`|v| = sqrt(v dot v)`\n\n    length (2,4,1,2) == sqrt (2^2+4^2+1^2+2^2) == 5\n\n",
                "type": "Float4 -> Float"
            },
            {
                "name": "lengthSquared",
                "comment": " The squared length. This is cheaper to calculate,\nso if you only need to compare lengths you can use this instead of the length.\n\n`|v|^2 = v dot w`\n\n    lengthSquared (3,4,1,2) == 3^2+4^2+1^2+2^2 == 30\n\n",
                "type": "Float4 -> Float"
            },
            {
                "name": "map",
                "comment": "\n\n    map (\\x -> x^2) (1,2,3,4) == (1,4,9,16)\n",
                "type": "(a -> b) -> Vec4 a -> Vec4 b"
            },
            {
                "name": "map2",
                "comment": "\n\n    map2 (<) (2,1,4,2) (3,2,1,6) == (True, True, False, True)\n",
                "type": "(a -> b -> c) -> Vec4 a -> Vec4 b -> Vec4 c"
            },
            {
                "name": "negate",
                "comment": " `-v`\n\n    negate (2,-1,5,1) == (-2,1,-5,-1)\n\n",
                "type": "Float4 -> Float4"
            },
            {
                "name": "normalize",
                "comment": " Normalizes a vector. This will give you a unit vector (e.g. with length 1) in the same direction as `v`.\n\n`v/|v|`\n\n    normalize (2,4,1,2) == (2/5,4/5,1/5,2/5)\n\nNaN warning: if v = 0\n\n",
                "type": "Float4 -> Float4"
            },
            {
                "name": "scale",
                "comment": " `a*v`\n\n    scale (3/2) (4,2,6,10) == (6,3,9,15)\n\n",
                "type": "Float -> Float4 -> Float4"
            },
            {
                "name": "setW",
                "comment": " ",
                "type": "a -> Vec4 a -> Vec4 a"
            },
            {
                "name": "setX",
                "comment": " ",
                "type": "a -> Vec4 a -> Vec4 a"
            },
            {
                "name": "setY",
                "comment": " ",
                "type": "a -> Vec4 a -> Vec4 a"
            },
            {
                "name": "setZ",
                "comment": " ",
                "type": "a -> Vec4 a -> Vec4 a"
            },
            {
                "name": "sub",
                "comment": " `v - w`\n\n    sub (4,6,1,2) (3,-1,-4,4) == (1,7,5,-2)\n\n",
                "type": "Float4 -> Float4 -> Float4"
            }
        ],
        "binops": []
    },
    {
        "name": "Matrix3",
        "comment": "\n\n\n## Matrix3\n\nThis will have some more functions soon.\nCurrently it's missing 2D transformation functions.\n\n@docs Mat3, Float3x3\n\n@docs map, map2\n\n@docs identity, add, sub, mul, mulVector, transpose, elementWiseMul\n\n@docs transform\n\n",
        "unions": [],
        "aliases": [
            {
                "name": "Float3x3",
                "comment": " ",
                "args": [],
                "type": "Mat3 Float"
            },
            {
                "name": "Mat3",
                "comment": " ",
                "args": [
                    "a"
                ],
                "type": "( Vec3 a, Vec3 a, Vec3 a )"
            }
        ],
        "values": [
            {
                "name": "add",
                "comment": " `A + B`\n",
                "type": "Float3x3 -> Float3x3 -> Float3x3"
            },
            {
                "name": "elementWiseMul",
                "comment": " `A .* B`\n",
                "type": "Float3x3 -> Float3x3 -> Float3x3"
            },
            {
                "name": "identity",
                "comment": " The identity matrix\n\n    I = |1 0 0|\n        |0 1 0|\n        |0 0 1|\n\n",
                "type": "Float3x3"
            },
            {
                "name": "map",
                "comment": " ",
                "type": "(a -> b) -> Mat3 a -> Mat3 b"
            },
            {
                "name": "map2",
                "comment": " ",
                "type": "(a -> b -> c) -> Mat3 a -> Mat3 b -> Mat3 c"
            },
            {
                "name": "mul",
                "comment": " `A*B`\n",
                "type": "Float3x3 -> Float3x3 -> Float3x3"
            },
            {
                "name": "mulVector",
                "comment": " `A*v`\n",
                "type": "Float3x3 -> Float3 -> Float3"
            },
            {
                "name": "sub",
                "comment": " `A - B`\n",
                "type": "Float3x3 -> Float3x3 -> Float3x3"
            },
            {
                "name": "transform",
                "comment": "\n\n    |v'| = A*|v|  v'/w\n    |w |     |1|,\n\nNaN/infinity warning: if w = 0\n\n",
                "type": "Float3x3 -> Float2 -> Float2"
            },
            {
                "name": "transpose",
                "comment": " `A^T`\n",
                "type": "Float3x3 -> Float3x3"
            }
        ],
        "binops": []
    },
    {
        "name": "Vector3",
        "comment": "\n\n\n## Vector3\n\n@docs Float3, Vec3\n\n@docs fromV2, setX, setY, setZ, getX, getY, getZ, map, map2, foldl, foldr\n\n@docs add, sub, negate, scale, divideBy\n\n@docs dot, cross, length, lengthSquared, normalize, directionFromTo, distance, distanceSquared, angle, project, reject\n\n",
        "unions": [],
        "aliases": [
            {
                "name": "Float3",
                "comment": " ",
                "args": [],
                "type": "Vec3 Float"
            },
            {
                "name": "Vec3",
                "comment": " ",
                "args": [
                    "a"
                ],
                "type": "( a, a, a )"
            }
        ],
        "values": [
            {
                "name": "add",
                "comment": " `v + w`\n\n    add (2,4,1) (3,-6,2) == (5,-2,3)\n\n",
                "type": "Float3 -> Float3 -> Float3"
            },
            {
                "name": "angle",
                "comment": " The angle between two vectors. The angle is in radians.\n\n`acos((v dot w)/(|v|*|w|))`\n\n    angle (-1,-1,2) (2,2,2) == pi/2    -- or 90°\n\nNaN warning: if v = 0 or w = 0\n\n",
                "type": "Float3 -> Float3 -> Float"
            },
            {
                "name": "cross",
                "comment": " `v cross w`\n\nThe **cross product** of two vectors. Also called **vector product**.\n\n`v cross w` is a vector that is perpendicular to both `v` and `w`\nand therefore normal to the plane containing them.\n\nThe length of `v cross w` is equal to the area of the parallelogram spanned by `v` and `w`.\n\n`|v cross w| = |v|*|w|*sin(phi)`\n\n    cross (2,1,3) (4,5,-3) == (1*(-3) - 3*5, 3*4 - 2*(-3), 2*5 - 1*4) == (-18, 18, 6)\n\n",
                "type": "Float3 -> Float3 -> Float3"
            },
            {
                "name": "directionFromTo",
                "comment": " A unit vector pointing from `v` to `w`\n\n`(w - v)/|w - v|`\n\n    directionFromTo (5,1,2) (9,3,6) == (2/3,1/3,2/3)\n\nNaN warning: if v = w\n\n",
                "type": "Float3 -> Float3 -> Float3"
            },
            {
                "name": "distance",
                "comment": " Calculates the distance from `v` to `w`.\n\n`|v - w| = |w - v|`\n\n    distance (2,0,4) (0,4,0) == 6\n\n",
                "type": "Float3 -> Float3 -> Float"
            },
            {
                "name": "distanceSquared",
                "comment": " The squared distance. This is slightly faster.\n\n`|v - w|^2`\n\n    distanceSquared (3,0,2) (0,4,1) == 26\n\n",
                "type": "Float3 -> Float3 -> Float"
            },
            {
                "name": "divideBy",
                "comment": " `v/a`\n\n    divideBy (1/2) (2,1,3) == (4,2,6)\n\nNaN/infinity warning: if a = 0\n\n",
                "type": "Float -> Float3 -> Float3"
            },
            {
                "name": "dot",
                "comment": " `v dot w`\n\nThe **dot product** of two vectors. Also called **scalar product** or **inner product**.\n\nIt links the length and angle of two vectors.\n\n`v dot w = |v|*|w|*cos(phi)`\n\n    dot (1,2,2) (3,3,2) == 1*3 + 2*3 + 2*2 == 13\n\n",
                "type": "Float3 -> Float3 -> Float"
            },
            {
                "name": "foldl",
                "comment": "\n\n    foldl (*) 1 (2,4,1) == 8\n",
                "type": "(elem -> acc -> acc) -> acc -> Vec3 elem -> acc"
            },
            {
                "name": "foldr",
                "comment": "\n\n    foldr max 0 (1,12,-5) == 12\n",
                "type": "(elem -> acc -> acc) -> acc -> Vec3 elem -> acc"
            },
            {
                "name": "fromV2",
                "comment": "\n\n    fromV2 (1,2) 3 == (1,2,3)\n",
                "type": "Vec2 a -> a -> Vec3 a"
            },
            {
                "name": "getX",
                "comment": " ",
                "type": "Vec3 a -> a"
            },
            {
                "name": "getY",
                "comment": " ",
                "type": "Vec3 a -> a"
            },
            {
                "name": "getZ",
                "comment": " ",
                "type": "Vec3 a -> a"
            },
            {
                "name": "length",
                "comment": " The length of a vector. Also known as magnitude or norm.\n\n`|v| = sqrt(v dot v)`\n\n    length (4,2,4) == sqrt (4^2+2^2+4^2) == 6\n\n",
                "type": "Float3 -> Float"
            },
            {
                "name": "lengthSquared",
                "comment": " The squared length. This is cheaper to calculate,\nso if you only need to compare lengths you can use this instead of the length.\n\n`|v|^2 = v dot w`\n\n    lengthSquared (3,4,1) == 3^2+4^2+1^2 == 26\n\n",
                "type": "Float3 -> Float"
            },
            {
                "name": "map",
                "comment": "\n\n    map sqrt (1,4,9) == (1,2,3)\n",
                "type": "(a -> b) -> Vec3 a -> Vec3 b"
            },
            {
                "name": "map2",
                "comment": "\n\n    map2 (/) (4,9,12) (2,3,4) == (2,3,3)\n",
                "type": "(a -> b -> c) -> Vec3 a -> Vec3 b -> Vec3 c"
            },
            {
                "name": "negate",
                "comment": " `-v`\n\n    negate (2,-1,5) == (-2,1,-5)\n\n",
                "type": "Float3 -> Float3"
            },
            {
                "name": "normalize",
                "comment": " Normalizes a vector. This will give you a unit vector (e.g. with length 1) in the same direction as `v`.\n\n`v/|v|`\n\n    normalize (4,2,4) == (2/3,1/3,2/3)\n\nNaN warning: if v = 0\n\n",
                "type": "Float3 -> Float3"
            },
            {
                "name": "project",
                "comment": " The projection of `v` onto `w`.\n\n`(v dot w)/|w| * w/|w|`\n\n    project (2,1,0) (4,0,0) == (2,0,0)\n\nNaN warning: if w = 0\n\n",
                "type": "Float3 -> Float3 -> Float3"
            },
            {
                "name": "reject",
                "comment": " The rejection of `v` onto `w`. This is always perpendicular to the projection.\n\n`v - (project v w)`\n\n    reject (2,1,0) (4,0,0) == (0,1,0)\n\nNaN warning: if w = 0\n\n",
                "type": "Float3 -> Float3 -> Float3"
            },
            {
                "name": "scale",
                "comment": " `a*v`\n\n    scale (1/2) (4,2,6) == (2,1,3)\n\n",
                "type": "Float -> Float3 -> Float3"
            },
            {
                "name": "setX",
                "comment": " ",
                "type": "a -> Vec3 a -> Vec3 a"
            },
            {
                "name": "setY",
                "comment": " ",
                "type": "a -> Vec3 a -> Vec3 a"
            },
            {
                "name": "setZ",
                "comment": " ",
                "type": "a -> Vec3 a -> Vec3 a"
            },
            {
                "name": "sub",
                "comment": " `v - w`\n\n    sub (4,6,1) (3,-1,-4) == (1,7,5)\n\n",
                "type": "Float3 -> Float3 -> Float3"
            }
        ],
        "binops": []
    },
    {
        "name": "Matrix2",
        "comment": "\n\n\n## Matrix2\n\n@docs Float2x2, Mat2\n\n\n## General operations\n\n@docs map, map2, foldl, foldr\n\n\n## Math\n\n@docs identity, fromRows, fromColumns\n\n@docs add, sub, mul, elementWiseMul, mulByConst, transpose, mulVector\n\n\n## Other\n\n@docs almostEqual, maxNorm\n\n",
        "unions": [],
        "aliases": [
            {
                "name": "Float2x2",
                "comment": " ",
                "args": [],
                "type": "Mat2 Float"
            },
            {
                "name": "Mat2",
                "comment": " ",
                "args": [
                    "a"
                ],
                "type": "( Vec2 a, Vec2 a )"
            }
        ],
        "values": [
            {
                "name": "add",
                "comment": " Matrix addition.\n\n    |a b|   |e f|   |a+e b+f|\n    |c d| + |g h| = |c+g d+h|\n\n",
                "type": "Float2x2 -> Float2x2 -> Float2x2"
            },
            {
                "name": "almostEqual",
                "comment": " This checks whether `|A - B| < eps`.\n\n    almostEqual eps a b\n\nThis is useful for testing, see the tests of this library for how this makes testing easy.\n\nSince any definition of a norm can be used for this, it uses the simple `maxNorm`\n\n",
                "type": "Float -> Float2x2 -> Float2x2 -> Bool"
            },
            {
                "name": "elementWiseMul",
                "comment": " Element wise multiplication. Also called Hadamard product, Schur product or entrywise product.\n\n    |a b|    |e f|   |ae bf|\n    |c d| .* |g h| = |cg dh|\n\n",
                "type": "Float2x2 -> Float2x2 -> Float2x2"
            },
            {
                "name": "foldl",
                "comment": " ",
                "type": "(elem -> acc -> acc) -> acc -> Mat2 elem -> acc"
            },
            {
                "name": "foldr",
                "comment": " ",
                "type": "(elem -> acc -> acc) -> acc -> Mat2 elem -> acc"
            },
            {
                "name": "fromColumns",
                "comment": " Construct a matrix from columns.\n\n    fromColumns (1,2) (3,4) == ((1,3),(2,4))\n\n",
                "type": "Float2 -> Float2 -> Float2x2"
            },
            {
                "name": "fromRows",
                "comment": " Construct a matrix from rows.\n\n    fromRows (1,2) (3,4) == ((1,2),(3,4))\n\n",
                "type": "Float2 -> Float2 -> Float2x2"
            },
            {
                "name": "identity",
                "comment": " The identity matrix.\n\n    I = |1 0|\n        |0 1|\n\n    I*A = A = A*I\n\n",
                "type": "Float2x2"
            },
            {
                "name": "map",
                "comment": "\n\n    elementsSquared =\n        map (\\x -> x ^ 2)\n",
                "type": "(a -> b) -> Mat2 a -> Mat2 b"
            },
            {
                "name": "map2",
                "comment": "\n\n    elementWiseDivision =\n        map2 (/)\n",
                "type": "(a -> b -> c) -> Mat2 a -> Mat2 b -> Mat2 c"
            },
            {
                "name": "maxNorm",
                "comment": " The max norm. This is the biggest element of a matrix.\nUseful for fuzz testing.\n",
                "type": "Float2x2 -> Float"
            },
            {
                "name": "mul",
                "comment": " Matrix multiplication.\n\n`A*B`\n\n",
                "type": "Float2x2 -> Float2x2 -> Float2x2"
            },
            {
                "name": "mulByConst",
                "comment": " `a*A`\nMultiply a matrix by a constant\n",
                "type": "Float -> Float2x2 -> Float2x2"
            },
            {
                "name": "mulVector",
                "comment": " Matrix-vector multiplication.\n\n          |a b| |x|   |ax+by|\n    A*v = |c d|*|y| = |cx+dy|\n\n",
                "type": "Float2x2 -> Float2 -> Float2"
            },
            {
                "name": "sub",
                "comment": " Matrix subtraction.\n\n`A - B`\n\n",
                "type": "Float2x2 -> Float2x2 -> Float2x2"
            },
            {
                "name": "transpose",
                "comment": " The transpose.\nFlips a matrix along it's diagonal.\n\n    |a b|T  |a c|\n    |c d| = |b d|\n\n",
                "type": "Float2x2 -> Float2x2"
            }
        ],
        "binops": []
    },
    {
        "name": "Vector2",
        "comment": "\n\n\n## Vector2\n\n@docs Float2, Vec2\n\n@docs setX, setY, getX, getY, map, map2, foldl, foldr\n\n@docs add, sub, negate, scale, divideBy\n\n@docs dot, length, lengthSquared, normalize, directionFromTo, distance, distanceSquared, angle, project, reject\n\n",
        "unions": [],
        "aliases": [
            {
                "name": "Float2",
                "comment": " ",
                "args": [],
                "type": "Vec2 Float"
            },
            {
                "name": "Vec2",
                "comment": " ",
                "args": [
                    "a"
                ],
                "type": "( a, a )"
            }
        ],
        "values": [
            {
                "name": "add",
                "comment": " `v + w`\n\n    add (1,2) (4,5) == (5,7)\n\n",
                "type": "Float2 -> Float2 -> Float2"
            },
            {
                "name": "angle",
                "comment": " The angle between two vectors. The angle is in radians.\n\n`acos((v dot w)/(|v|*|w|))`\n\n    angle (1,0) (2,2) == pi/4    -- or 45°\n\nNaN warning: if v = 0 or w = 0\n\n",
                "type": "Float2 -> Float2 -> Float"
            },
            {
                "name": "directionFromTo",
                "comment": " A unit vector pointing from `v` to `w`\n\n`(w - v)/|w - v|`\n\n    directionFromTo (5,1) (8,5) == (3/5,4/5)\n\nNaN warning: if v = w\n\n",
                "type": "Float2 -> Float2 -> Float2"
            },
            {
                "name": "distance",
                "comment": " Calculates the distance from `v` to `w`.\n\n`|v - w| = |w - v|`\n\n    distance (3,0) (0,4) == 5\n\n",
                "type": "Float2 -> Float2 -> Float"
            },
            {
                "name": "distanceSquared",
                "comment": " The squared distance. This is slightly faster.\n\n`|v - w|^2`\n\n    distanceSquared (3,0) (0,4) == 25\n\n",
                "type": "Float2 -> Float2 -> Float"
            },
            {
                "name": "divideBy",
                "comment": " `v/a`\n\n    divideBy 4 (12,16) == (3,4)\n\nNaN/infinity warning: if a = 0\n\n",
                "type": "Float -> Float2 -> Float2"
            },
            {
                "name": "dot",
                "comment": " `v dot w`\n\nThe **dot product** of two vectors. Also called **scalar product** or **inner product**.\n\nIt links the length and angle of two vectors.\n\n`v dot w = |v|*|w|*cos(phi)`\n\n    dot (1,2) (3,2) == 1*3 + 2*2 == 7\n\n",
                "type": "Float2 -> Float2 -> Float"
            },
            {
                "name": "foldl",
                "comment": "\n\n    foldl (+) 0 (2,4) == 6\n",
                "type": "(elem -> acc -> acc) -> acc -> Vec2 elem -> acc"
            },
            {
                "name": "foldr",
                "comment": "\n\n    foldr (-) 0 (1,12) == -11\n",
                "type": "(elem -> acc -> acc) -> acc -> Vec2 elem -> acc"
            },
            {
                "name": "getX",
                "comment": " ",
                "type": "Vec2 a -> a"
            },
            {
                "name": "getY",
                "comment": " ",
                "type": "Vec2 a -> a"
            },
            {
                "name": "length",
                "comment": " The length of a vector. Also known as magnitude or norm.\n\n`|v| = sqrt(v dot v)`\n\n    length (3,4) == sqrt(3^2+4^2) == 5\n\n",
                "type": "Float2 -> Float"
            },
            {
                "name": "lengthSquared",
                "comment": " The squared length. This is cheaper to calculate,\nso if you only need to compare lengths you can use this instead of the length.\n\n`|v|^2 = v dot w`\n\n    lengthSquared (3,4) == 3^2+4^2 == 25\n\n",
                "type": "Float2 -> Float"
            },
            {
                "name": "map",
                "comment": "\n\n    map ((+) 1) (2,3) == (3,4)\n",
                "type": "(a -> b) -> Vec2 a -> Vec2 b"
            },
            {
                "name": "map2",
                "comment": "\n\n    map2 (*) (2,4) (3,2) == (6,8)\n",
                "type": "(a -> b -> c) -> Vec2 a -> Vec2 b -> Vec2 c"
            },
            {
                "name": "negate",
                "comment": " `-v`\n\n    negate (2,-4) == (-2,4)\n\n",
                "type": "Float2 -> Float2"
            },
            {
                "name": "normalize",
                "comment": " Normalizes a vector. This will give you a unit vector (e.g. with length 1) in the same direction as `v`.\n\n`v/|v|`\n\n    normalize (3,4) == (3/5,4/5)\n\nNaN warning: if v = 0\n\n",
                "type": "Float2 -> Float2"
            },
            {
                "name": "project",
                "comment": " The projection of `v` onto `w`.\n\n`(v dot w)/|w| * w/|w|`\n\n    project (2,1) (4,0) == (2,0)\n\nNaN/infinity warning: if w = 0\n\n",
                "type": "Float2 -> Float2 -> Float2"
            },
            {
                "name": "reject",
                "comment": " The rejection of `v` onto `w`. This is always perpendicular to the projection.\n\n`v - (project v w)`\n\n    reject (2,1) (4,0) == (0,1)\n\nNaN/infinity warning: if w = 0\n\n",
                "type": "Float2 -> Float2 -> Float2"
            },
            {
                "name": "scale",
                "comment": " `a*v`\n\n    scale 3 ( 2, 3 ) =\n        ( 6, 9 )\n\n",
                "type": "Float -> Float2 -> Float2"
            },
            {
                "name": "setX",
                "comment": " ",
                "type": "a -> Vec2 a -> Vec2 a"
            },
            {
                "name": "setY",
                "comment": " ",
                "type": "a -> Vec2 a -> Vec2 a"
            },
            {
                "name": "sub",
                "comment": " `v - w`\n\n    sub (3,1) (-3,8) == (6,-7)\n\n",
                "type": "Float2 -> Float2 -> Float2"
            }
        ],
        "binops": []
    }
]