[{"name":"AltMath.Alternative.ADT.Matrix4","comment":" This library uses the convention that the prefix `make` is creating a new\narray,as without the prefix, you are applying some transform to an\nexisting matrix.\n\n\n# Create\n\n@docs Mat4, identity\n\n\n# Operations\n\n@docs inverse, inverseOrthonormal, mul, mulAffine, transpose, makeBasis, transform\n\n\n# Projections\n\n@docs makeFrustum, makePerspective, makeOrtho, makeOrtho2D, makeLookAt\n\n\n# Apply Transformations\n\n@docs rotate, scale, scale3, translate, translate3\n\n\n# Create Transformations\n\n@docs makeRotate, makeScale, makeScale3, makeTranslate, makeTranslate3\n\n\n# Conversions\n\n@docs toRecord, fromRecord\n\n","unions":[{"name":"Mat4","comment":" 4x4 matrix type\n","args":[],"cases":[]}],"aliases":[],"values":[{"name":"fromRecord","comment":" Convert a record to a matrix.\n","type":"{ m11 : Basics.Float, m21 : Basics.Float, m31 : Basics.Float, m41 : Basics.Float, m12 : Basics.Float, m22 : Basics.Float, m32 : Basics.Float, m42 : Basics.Float, m13 : Basics.Float, m23 : Basics.Float, m33 : Basics.Float, m43 : Basics.Float, m14 : Basics.Float, m24 : Basics.Float, m34 : Basics.Float, m44 : Basics.Float } -> AltMath.Alternative.ADT.Matrix4.Mat4"},{"name":"identity","comment":" A matrix with all 0s, except 1s on the diagonal.\n","type":"AltMath.Alternative.ADT.Matrix4.Mat4"},{"name":"inverse","comment":" Computes the inverse of any matrix. This is somewhat computationally\nintensive. If the matrix is not invertible, `Nothing` is returned.\n","type":"AltMath.Alternative.ADT.Matrix4.Mat4 -> Maybe.Maybe AltMath.Alternative.ADT.Matrix4.Mat4"},{"name":"inverseOrthonormal","comment":" Computes the inverse of the given matrix, assuming that the matrix is\northonormal. This algorithm is more efficient than general matrix inversion, and\nhas no possibility of failing.\n","type":"AltMath.Alternative.ADT.Matrix4.Mat4 -> AltMath.Alternative.ADT.Matrix4.Mat4"},{"name":"makeBasis","comment":" Creates a transform from a basis consisting of 3 linearly independent vectors.\n","type":"AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Matrix4.Mat4"},{"name":"makeFrustum","comment":" Creates a matrix for a projection frustum with the given parameters.\n\nParameters:\n\n  - left - the left coordinate of the frustum\n  - right- the right coordinate of the frustum\n  - bottom - the bottom coordinate of the frustum\n  - top - the top coordinate of the frustum\n  - znear - the near z distance of the frustum\n  - zfar - the far z distance of the frustum\n\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.ADT.Matrix4.Mat4"},{"name":"makeLookAt","comment":" Creates a transformation matrix for a camera.\n\nParameters:\n\n  - eye - The location of the camera\n  - center - The location of the focused object\n  - up - The \"up\" direction according to the camera\n\n","type":"AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Matrix4.Mat4"},{"name":"makeOrtho","comment":" Creates a matrix for an orthogonal frustum projection with the given parameters.\n\nParameters:\n\n  - left - the left coordinate of the frustum\n  - right- the right coordinate of the frustum\n  - bottom - the bottom coordinate of the frustum\n  - top - the top coordinate of the frustum\n  - znear - the near z distance of the frustum\n  - zfar - the far z distance of the frustum\n\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.ADT.Matrix4.Mat4"},{"name":"makeOrtho2D","comment":" Creates a matrix for a 2D orthogonal frustum projection with the given\nparameters. `znear` and `zfar` are assumed to be -1 and 1, respectively.\n\nParameters:\n\n  - left - the left coordinate of the frustum\n  - right- the right coordinate of the frustum\n  - bottom - the bottom coordinate of the frustum\n  - top - the top coordinate of the frustum\n\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.ADT.Matrix4.Mat4"},{"name":"makePerspective","comment":" Creates a matrix for a perspective projection with the given parameters.\n\nParameters:\n\n  - fovy - field of view in the y axis, in degrees\n  - aspect - aspect ratio\n  - znear - the near z distance of the projection\n  - zfar - the far z distance of the projection\n\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.ADT.Matrix4.Mat4"},{"name":"makeRotate","comment":" Creates a transformation matrix for rotation in radians about the\n3-element vector axis.\n","type":"Basics.Float -> AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Matrix4.Mat4"},{"name":"makeScale","comment":" Creates a transformation matrix for scaling each of the x, y, and z axes by\nthe amount given in the corresponding element of the 3-element vector.\n","type":"AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Matrix4.Mat4"},{"name":"makeScale3","comment":" Creates a transformation matrix for scaling by 3 scalar values, one for\neach of the x, y, and z directions.\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.ADT.Matrix4.Mat4"},{"name":"makeTranslate","comment":" Creates a transformation matrix for translating each of the x, y, and z\naxes by the amount given in the corresponding element of the 3-element vector.\n","type":"AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Matrix4.Mat4"},{"name":"makeTranslate3","comment":" Creates a transformation matrix for translating by 3 scalar values, one for\neach of the x, y, and z directions.\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.ADT.Matrix4.Mat4"},{"name":"mul","comment":" Matrix multiplcation: a \\* b\n","type":"AltMath.Alternative.ADT.Matrix4.Mat4 -> AltMath.Alternative.ADT.Matrix4.Mat4 -> AltMath.Alternative.ADT.Matrix4.Mat4"},{"name":"mulAffine","comment":" Matrix multiplication, assuming a and b are affine: a \\* b\n","type":"AltMath.Alternative.ADT.Matrix4.Mat4 -> AltMath.Alternative.ADT.Matrix4.Mat4 -> AltMath.Alternative.ADT.Matrix4.Mat4"},{"name":"rotate","comment":" Concatenates a rotation in radians about an axis to the given matrix.\n","type":"Basics.Float -> AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Matrix4.Mat4 -> AltMath.Alternative.ADT.Matrix4.Mat4"},{"name":"scale","comment":" Concatenates a scaling to the given matrix.\n","type":"AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Matrix4.Mat4 -> AltMath.Alternative.ADT.Matrix4.Mat4"},{"name":"scale3","comment":" Concatenates a scaling to the given matrix.\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.ADT.Matrix4.Mat4 -> AltMath.Alternative.ADT.Matrix4.Mat4"},{"name":"toRecord","comment":" Convert a matrix to a record. Elements are given by their row and column indices, starting at 1, so `m23` means the element in the second row, third column.\n","type":"AltMath.Alternative.ADT.Matrix4.Mat4 -> { m11 : Basics.Float, m21 : Basics.Float, m31 : Basics.Float, m41 : Basics.Float, m12 : Basics.Float, m22 : Basics.Float, m32 : Basics.Float, m42 : Basics.Float, m13 : Basics.Float, m23 : Basics.Float, m33 : Basics.Float, m43 : Basics.Float, m14 : Basics.Float, m24 : Basics.Float, m34 : Basics.Float, m44 : Basics.Float }"},{"name":"transform","comment":" Multiply a vector by a 4x4 matrix: m \\* v\n","type":"AltMath.Alternative.ADT.Matrix4.Mat4 -> AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Vector3.Vec3"},{"name":"translate","comment":" Concatenates a translation to the given matrix.\n","type":"AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Matrix4.Mat4 -> AltMath.Alternative.ADT.Matrix4.Mat4"},{"name":"translate3","comment":" Concatenates a translation to the given matrix.\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.ADT.Matrix4.Mat4 -> AltMath.Alternative.ADT.Matrix4.Mat4"},{"name":"transpose","comment":" \"Flip\" the matrix across the diagonal by swapping row index and column\nindex.\n","type":"AltMath.Alternative.ADT.Matrix4.Mat4 -> AltMath.Alternative.ADT.Matrix4.Mat4"}],"binops":[]},{"name":"AltMath.Alternative.ADT.Vector2","comment":"\n\n\n# Create\n\n@docs Vec2, vec2\n\n\n# Get and Set\n\nThe set functions create a new copy of the vector, updating a single field.\n\n@docs getX, getY, setX, setY\n\n\n# Operations\n\n@docs add, sub, negate, scale, dot, normalize, direction, mul\n@docs length, lengthSquared, distance, distanceSquared\n\n\n# Conversions\n\n@docs toRecord, fromRecord\n\n","unions":[{"name":"Vec2","comment":" Two dimensional vector type\n","args":[],"cases":[["Vec2",["Basics.Float","Basics.Float"]]]}],"aliases":[],"values":[{"name":"add","comment":" Vector addition: a + b\n","type":"AltMath.Alternative.ADT.Vector2.Vec2 -> AltMath.Alternative.ADT.Vector2.Vec2 -> AltMath.Alternative.ADT.Vector2.Vec2"},{"name":"direction","comment":" The normalized direction from b to a: (a - b) / |a - b|\n","type":"AltMath.Alternative.ADT.Vector2.Vec2 -> AltMath.Alternative.ADT.Vector2.Vec2 -> AltMath.Alternative.ADT.Vector2.Vec2"},{"name":"distance","comment":" The distance between two vectors.\n","type":"AltMath.Alternative.ADT.Vector2.Vec2 -> AltMath.Alternative.ADT.Vector2.Vec2 -> Basics.Float"},{"name":"distanceSquared","comment":" The square of the distance between two vectors.\n","type":"AltMath.Alternative.ADT.Vector2.Vec2 -> AltMath.Alternative.ADT.Vector2.Vec2 -> Basics.Float"},{"name":"dot","comment":" The dot product of a and b\n","type":"AltMath.Alternative.ADT.Vector2.Vec2 -> AltMath.Alternative.ADT.Vector2.Vec2 -> Basics.Float"},{"name":"fromRecord","comment":" Convert a record to a vector.\n","type":"{ x : Basics.Float, y : Basics.Float } -> AltMath.Alternative.ADT.Vector2.Vec2"},{"name":"getX","comment":" Extract the x component of a vector.\n","type":"AltMath.Alternative.ADT.Vector2.Vec2 -> Basics.Float"},{"name":"getY","comment":" Extract the y component of a vector.\n","type":"AltMath.Alternative.ADT.Vector2.Vec2 -> Basics.Float"},{"name":"length","comment":" The length of the given vector: |a|\n","type":"AltMath.Alternative.ADT.Vector2.Vec2 -> Basics.Float"},{"name":"lengthSquared","comment":" The square of the length of the given vector: |a| \\* |a|\n","type":"AltMath.Alternative.ADT.Vector2.Vec2 -> Basics.Float"},{"name":"mul","comment":" Multiply the vector by a vector: a \\* b\n","type":"AltMath.Alternative.ADT.Vector2.Vec2 -> AltMath.Alternative.ADT.Vector2.Vec2 -> AltMath.Alternative.ADT.Vector2.Vec2"},{"name":"negate","comment":" Vector negation: -a\n","type":"AltMath.Alternative.ADT.Vector2.Vec2 -> AltMath.Alternative.ADT.Vector2.Vec2"},{"name":"normalize","comment":" A unit vector with the same direction as the given vector: a / |a|\n","type":"AltMath.Alternative.ADT.Vector2.Vec2 -> AltMath.Alternative.ADT.Vector2.Vec2"},{"name":"scale","comment":" Multiply the vector by a scalar: s \\* v\n","type":"Basics.Float -> AltMath.Alternative.ADT.Vector2.Vec2 -> AltMath.Alternative.ADT.Vector2.Vec2"},{"name":"setX","comment":" Update the x component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.ADT.Vector2.Vec2 -> AltMath.Alternative.ADT.Vector2.Vec2"},{"name":"setY","comment":" Update the y component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.ADT.Vector2.Vec2 -> AltMath.Alternative.ADT.Vector2.Vec2"},{"name":"sub","comment":" Vector subtraction: a - b\n","type":"AltMath.Alternative.ADT.Vector2.Vec2 -> AltMath.Alternative.ADT.Vector2.Vec2 -> AltMath.Alternative.ADT.Vector2.Vec2"},{"name":"toRecord","comment":" Convert a vector to a record.\n","type":"AltMath.Alternative.ADT.Vector2.Vec2 -> { x : Basics.Float, y : Basics.Float }"},{"name":"vec2","comment":" Creates a new 2-element vector with the given values.\n","type":"Basics.Float -> Basics.Float -> AltMath.Alternative.ADT.Vector2.Vec2"}],"binops":[]},{"name":"AltMath.Alternative.ADT.Vector3","comment":"\n\n\n# Create\n\n@docs Vec3, vec3, i, j, k\n\n\n# Get and Set\n\nThe set functions create a new copy of the vector, updating a single field.\n\n@docs getX, getY, getZ, setX, setY, setZ\n\n\n# Operations\n\n@docs add, sub, negate, scale, dot, cross, normalize, direction\n@docs length, lengthSquared, distance, distanceSquared\n\n\n# Conversions\n\n@docs toRecord, fromRecord\n\n","unions":[{"name":"Vec3","comment":" Three dimensional vector type\n","args":[],"cases":[["Vec3",["Basics.Float","Basics.Float","Basics.Float"]]]}],"aliases":[],"values":[{"name":"add","comment":" Vector addition: a + b\n","type":"AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Vector3.Vec3"},{"name":"cross","comment":" The cross product of a and b\n","type":"AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Vector3.Vec3"},{"name":"direction","comment":" The normalized direction from b to a: (a - b) / |a - b|\n","type":"AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Vector3.Vec3"},{"name":"distance","comment":" The distance between two vectors.\n","type":"AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Vector3.Vec3 -> Basics.Float"},{"name":"distanceSquared","comment":" The square of the distance between two vectors.\n","type":"AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Vector3.Vec3 -> Basics.Float"},{"name":"dot","comment":" The dot product of a and b\n","type":"AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Vector3.Vec3 -> Basics.Float"},{"name":"fromRecord","comment":" Convert a record to a vector.\n","type":"{ x : Basics.Float, y : Basics.Float, z : Basics.Float } -> AltMath.Alternative.ADT.Vector3.Vec3"},{"name":"getX","comment":" Extract the x component of a vector.\n","type":"AltMath.Alternative.ADT.Vector3.Vec3 -> Basics.Float"},{"name":"getY","comment":" Extract the y component of a vector.\n","type":"AltMath.Alternative.ADT.Vector3.Vec3 -> Basics.Float"},{"name":"getZ","comment":" Extract the z component of a vector.\n","type":"AltMath.Alternative.ADT.Vector3.Vec3 -> Basics.Float"},{"name":"i","comment":" The unit vector &icirc; which points in the x direction: `vec3 1 0 0`\n","type":"AltMath.Alternative.ADT.Vector3.Vec3"},{"name":"j","comment":" The unit vector &jcirc; which points in the y direction: `vec3 0 1 0`\n","type":"AltMath.Alternative.ADT.Vector3.Vec3"},{"name":"k","comment":" The unit vector k&#0770; which points in the z direction: `vec3 0 0 1`\n","type":"AltMath.Alternative.ADT.Vector3.Vec3"},{"name":"length","comment":" The length of the given vector: |a|\n","type":"AltMath.Alternative.ADT.Vector3.Vec3 -> Basics.Float"},{"name":"lengthSquared","comment":" The square of the length of the given vector: |a| \\* |a|\n","type":"AltMath.Alternative.ADT.Vector3.Vec3 -> Basics.Float"},{"name":"negate","comment":" Vector negation: -a\n","type":"AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Vector3.Vec3"},{"name":"normalize","comment":" A unit vector with the same direction as the given vector: a / |a|\n","type":"AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Vector3.Vec3"},{"name":"scale","comment":" Multiply the vector by a scalar: s \\* v\n","type":"Basics.Float -> AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Vector3.Vec3"},{"name":"setX","comment":" Update the x component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Vector3.Vec3"},{"name":"setY","comment":" Update the y component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Vector3.Vec3"},{"name":"setZ","comment":" Update the z component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Vector3.Vec3"},{"name":"sub","comment":" Vector subtraction: a - b\n","type":"AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Vector3.Vec3 -> AltMath.Alternative.ADT.Vector3.Vec3"},{"name":"toRecord","comment":" Convert a vector to a record.\n","type":"AltMath.Alternative.ADT.Vector3.Vec3 -> { x : Basics.Float, y : Basics.Float, z : Basics.Float }"},{"name":"vec3","comment":" Creates a new 3-element vector with the given values.\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.ADT.Vector3.Vec3"}],"binops":[]},{"name":"AltMath.Alternative.ADT.Vector4","comment":"\n\n\n# Create\n\n@docs Vec4, vec4\n\n\n# Get and Set\n\nThe set functions create a new copy of the vector, updating a single field.\n\n@docs getX, getY, getZ, getW, setX, setY, setZ, setW\n\n\n# Operations\n\n@docs add, sub, negate, scale, dot, normalize, direction\n@docs length, lengthSquared, distance, distanceSquared\n\n\n# Conversions\n\n@docs toRecord, fromRecord\n\n","unions":[{"name":"Vec4","comment":" Four dimensional vector type\n","args":[],"cases":[["Vec4",["Basics.Float","Basics.Float","Basics.Float","Basics.Float"]]]}],"aliases":[],"values":[{"name":"add","comment":" Vector addition: a + b\n","type":"AltMath.Alternative.ADT.Vector4.Vec4 -> AltMath.Alternative.ADT.Vector4.Vec4 -> AltMath.Alternative.ADT.Vector4.Vec4"},{"name":"direction","comment":" The normalized direction from b to a: (a - b) / |a - b|\n","type":"AltMath.Alternative.ADT.Vector4.Vec4 -> AltMath.Alternative.ADT.Vector4.Vec4 -> AltMath.Alternative.ADT.Vector4.Vec4"},{"name":"distance","comment":" The distance between two vectors.\n","type":"AltMath.Alternative.ADT.Vector4.Vec4 -> AltMath.Alternative.ADT.Vector4.Vec4 -> Basics.Float"},{"name":"distanceSquared","comment":" The square of the distance between two vectors.\n","type":"AltMath.Alternative.ADT.Vector4.Vec4 -> AltMath.Alternative.ADT.Vector4.Vec4 -> Basics.Float"},{"name":"dot","comment":" The dot product of a and b\n","type":"AltMath.Alternative.ADT.Vector4.Vec4 -> AltMath.Alternative.ADT.Vector4.Vec4 -> Basics.Float"},{"name":"fromRecord","comment":" Convert a record to a vector.\n","type":"{ x : Basics.Float, y : Basics.Float, z : Basics.Float, w : Basics.Float } -> AltMath.Alternative.ADT.Vector4.Vec4"},{"name":"getW","comment":" Extract the w component of a vector.\n","type":"AltMath.Alternative.ADT.Vector4.Vec4 -> Basics.Float"},{"name":"getX","comment":" Extract the x component of a vector.\n","type":"AltMath.Alternative.ADT.Vector4.Vec4 -> Basics.Float"},{"name":"getY","comment":" Extract the y component of a vector.\n","type":"AltMath.Alternative.ADT.Vector4.Vec4 -> Basics.Float"},{"name":"getZ","comment":" Extract the z component of a vector.\n","type":"AltMath.Alternative.ADT.Vector4.Vec4 -> Basics.Float"},{"name":"length","comment":" The length of the given vector: |a|\n","type":"AltMath.Alternative.ADT.Vector4.Vec4 -> Basics.Float"},{"name":"lengthSquared","comment":" The square of the length of the given vector: |a| \\* |a|\n","type":"AltMath.Alternative.ADT.Vector4.Vec4 -> Basics.Float"},{"name":"negate","comment":" Vector negation: -a\n","type":"AltMath.Alternative.ADT.Vector4.Vec4 -> AltMath.Alternative.ADT.Vector4.Vec4"},{"name":"normalize","comment":" A unit vector with the same direction as the given vector: a / |a|\n","type":"AltMath.Alternative.ADT.Vector4.Vec4 -> AltMath.Alternative.ADT.Vector4.Vec4"},{"name":"scale","comment":" Multiply the vector by a scalar: s \\* v\n","type":"Basics.Float -> AltMath.Alternative.ADT.Vector4.Vec4 -> AltMath.Alternative.ADT.Vector4.Vec4"},{"name":"setW","comment":" Update the w component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.ADT.Vector4.Vec4 -> AltMath.Alternative.ADT.Vector4.Vec4"},{"name":"setX","comment":" Update the x component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.ADT.Vector4.Vec4 -> AltMath.Alternative.ADT.Vector4.Vec4"},{"name":"setY","comment":" Update the y component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.ADT.Vector4.Vec4 -> AltMath.Alternative.ADT.Vector4.Vec4"},{"name":"setZ","comment":" Update the z component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.ADT.Vector4.Vec4 -> AltMath.Alternative.ADT.Vector4.Vec4"},{"name":"sub","comment":" Vector subtraction: a - b\n","type":"AltMath.Alternative.ADT.Vector4.Vec4 -> AltMath.Alternative.ADT.Vector4.Vec4 -> AltMath.Alternative.ADT.Vector4.Vec4"},{"name":"toRecord","comment":" Convert a vector to a record.\n","type":"AltMath.Alternative.ADT.Vector4.Vec4 -> { x : Basics.Float, y : Basics.Float, z : Basics.Float, w : Basics.Float }"},{"name":"vec4","comment":" Creates a new 4-element vector with the given x, y, z, and w values.\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.ADT.Vector4.Vec4"}],"binops":[]},{"name":"AltMath.Alternative.Record.Matrix4","comment":" This library uses the convention that the prefix `make` is creating a new\narray,as without the prefix, you are applying some transform to an\nexisting matrix.\n\n\n# Create\n\n@docs Mat4, identity\n\n\n# Operations\n\n@docs inverse, inverseOrthonormal, mul, mulAffine, transpose, makeBasis, transform\n\n\n# Projections\n\n@docs makeFrustum, makePerspective, makeOrtho, makeOrtho2D, makeLookAt\n\n\n# Apply Transformations\n\n@docs rotate, scale, scale3, translate, translate3\n\n\n# Create Transformations\n\n@docs makeRotate, makeScale, makeScale3, makeTranslate, makeTranslate3\n\n\n# Conversions\n\n@docs toRecord, fromRecord\n\n","unions":[],"aliases":[{"name":"Mat4","comment":" 4x4 matrix type\n","args":[],"type":"{ m11 : Basics.Float, m21 : Basics.Float, m31 : Basics.Float, m41 : Basics.Float, m12 : Basics.Float, m22 : Basics.Float, m32 : Basics.Float, m42 : Basics.Float, m13 : Basics.Float, m23 : Basics.Float, m33 : Basics.Float, m43 : Basics.Float, m14 : Basics.Float, m24 : Basics.Float, m34 : Basics.Float, m44 : Basics.Float }"}],"values":[{"name":"fromRecord","comment":" Convert a record to a matrix.\n","type":"AltMath.Alternative.Record.Matrix4.Mat4 -> AltMath.Alternative.Record.Matrix4.Mat4"},{"name":"identity","comment":" A matrix with all 0s, except 1s on the diagonal.\n","type":"AltMath.Alternative.Record.Matrix4.Mat4"},{"name":"inverse","comment":" Computes the inverse of any matrix. This is somewhat computationally\nintensive. If the matrix is not invertible, `Nothing` is returned.\n","type":"AltMath.Alternative.Record.Matrix4.Mat4 -> Maybe.Maybe AltMath.Alternative.Record.Matrix4.Mat4"},{"name":"inverseOrthonormal","comment":" Computes the inverse of the given matrix, assuming that the matrix is\northonormal. This algorithm is more efficient than general matrix inversion, and\nhas no possibility of failing.\n","type":"AltMath.Alternative.Record.Matrix4.Mat4 -> AltMath.Alternative.Record.Matrix4.Mat4"},{"name":"makeBasis","comment":" Creates a transform from a basis consisting of 3 linearly independent vectors.\n","type":"AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Matrix4.Mat4"},{"name":"makeFrustum","comment":" Creates a matrix for a projection frustum with the given parameters.\n\nParameters:\n\n  - left - the left coordinate of the frustum\n  - right- the right coordinate of the frustum\n  - bottom - the bottom coordinate of the frustum\n  - top - the top coordinate of the frustum\n  - znear - the near z distance of the frustum\n  - zfar - the far z distance of the frustum\n\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.Record.Matrix4.Mat4"},{"name":"makeLookAt","comment":" Creates a transformation matrix for a camera.\n\nParameters:\n\n  - eye - The location of the camera\n  - center - The location of the focused object\n  - up - The \"up\" direction according to the camera\n\n","type":"AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Matrix4.Mat4"},{"name":"makeOrtho","comment":" Creates a matrix for an orthogonal frustum projection with the given parameters.\n\nParameters:\n\n  - left - the left coordinate of the frustum\n  - right- the right coordinate of the frustum\n  - bottom - the bottom coordinate of the frustum\n  - top - the top coordinate of the frustum\n  - znear - the near z distance of the frustum\n  - zfar - the far z distance of the frustum\n\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.Record.Matrix4.Mat4"},{"name":"makeOrtho2D","comment":" Creates a matrix for a 2D orthogonal frustum projection with the given\nparameters. `znear` and `zfar` are assumed to be -1 and 1, respectively.\n\nParameters:\n\n  - left - the left coordinate of the frustum\n  - right- the right coordinate of the frustum\n  - bottom - the bottom coordinate of the frustum\n  - top - the top coordinate of the frustum\n\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.Record.Matrix4.Mat4"},{"name":"makePerspective","comment":" Creates a matrix for a perspective projection with the given parameters.\n\nParameters:\n\n  - fovy - field of view in the y axis, in degrees\n  - aspect - aspect ratio\n  - znear - the near z distance of the projection\n  - zfar - the far z distance of the projection\n\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.Record.Matrix4.Mat4"},{"name":"makeRotate","comment":" Creates a transformation matrix for rotation in radians about the\n3-element vector axis.\n","type":"Basics.Float -> AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Matrix4.Mat4"},{"name":"makeScale","comment":" Creates a transformation matrix for scaling each of the x, y, and z axes by\nthe amount given in the corresponding element of the 3-element vector.\n","type":"AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Matrix4.Mat4"},{"name":"makeScale3","comment":" Creates a transformation matrix for scaling by 3 scalar values, one for\neach of the x, y, and z directions.\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.Record.Matrix4.Mat4"},{"name":"makeTranslate","comment":" Creates a transformation matrix for translating each of the x, y, and z\naxes by the amount given in the corresponding element of the 3-element vector.\n","type":"AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Matrix4.Mat4"},{"name":"makeTranslate3","comment":" Creates a transformation matrix for translating by 3 scalar values, one for\neach of the x, y, and z directions.\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.Record.Matrix4.Mat4"},{"name":"mul","comment":" Matrix multiplcation: a \\* b\n","type":"AltMath.Alternative.Record.Matrix4.Mat4 -> AltMath.Alternative.Record.Matrix4.Mat4 -> AltMath.Alternative.Record.Matrix4.Mat4"},{"name":"mulAffine","comment":" Matrix multiplication, assuming a and b are affine: a \\* b\n","type":"AltMath.Alternative.Record.Matrix4.Mat4 -> AltMath.Alternative.Record.Matrix4.Mat4 -> AltMath.Alternative.Record.Matrix4.Mat4"},{"name":"rotate","comment":" Concatenates a rotation in radians about an axis to the given matrix.\n","type":"Basics.Float -> AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Matrix4.Mat4 -> AltMath.Alternative.Record.Matrix4.Mat4"},{"name":"scale","comment":" Concatenates a scaling to the given matrix.\n","type":"AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Matrix4.Mat4 -> AltMath.Alternative.Record.Matrix4.Mat4"},{"name":"scale3","comment":" Concatenates a scaling to the given matrix.\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.Record.Matrix4.Mat4 -> AltMath.Alternative.Record.Matrix4.Mat4"},{"name":"toRecord","comment":" Convert a matrix to a record. Elements are given by their row and column indices, starting at 1, so `m23` means the element in the second row, third column.\n","type":"AltMath.Alternative.Record.Matrix4.Mat4 -> AltMath.Alternative.Record.Matrix4.Mat4"},{"name":"transform","comment":" Multiply a vector by a 4x4 matrix: m \\* v\n","type":"AltMath.Alternative.Record.Matrix4.Mat4 -> AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Vector3.Vec3"},{"name":"translate","comment":" Concatenates a translation to the given matrix.\n","type":"AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Matrix4.Mat4 -> AltMath.Alternative.Record.Matrix4.Mat4"},{"name":"translate3","comment":" Concatenates a translation to the given matrix.\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.Record.Matrix4.Mat4 -> AltMath.Alternative.Record.Matrix4.Mat4"},{"name":"transpose","comment":" \"Flip\" the matrix across the diagonal by swapping row index and column\nindex.\n","type":"AltMath.Alternative.Record.Matrix4.Mat4 -> AltMath.Alternative.Record.Matrix4.Mat4"}],"binops":[]},{"name":"AltMath.Alternative.Record.Vector2","comment":"\n\n\n# Create\n\n@docs Vec2, vec2\n\n\n# Get and Set\n\nThe set functions create a new copy of the vector, updating a single field.\n\n@docs getX, getY, setX, setY\n\n\n# Operations\n\n@docs add, sub, negate, scale, dot, normalize, direction, mul\n@docs length, lengthSquared, distance, distanceSquared\n\n\n# Conversions\n\n@docs toRecord, fromRecord\n\n","unions":[],"aliases":[{"name":"Vec2","comment":" Two dimensional vector type\n","args":[],"type":"{ x : Basics.Float, y : Basics.Float }"}],"values":[{"name":"add","comment":" Vector addition: a + b\n","type":"AltMath.Alternative.Record.Vector2.Vec2 -> AltMath.Alternative.Record.Vector2.Vec2 -> AltMath.Alternative.Record.Vector2.Vec2"},{"name":"direction","comment":" The normalized direction from b to a: (a - b) / |a - b|\n","type":"AltMath.Alternative.Record.Vector2.Vec2 -> AltMath.Alternative.Record.Vector2.Vec2 -> AltMath.Alternative.Record.Vector2.Vec2"},{"name":"distance","comment":" The distance between two vectors.\n","type":"AltMath.Alternative.Record.Vector2.Vec2 -> AltMath.Alternative.Record.Vector2.Vec2 -> Basics.Float"},{"name":"distanceSquared","comment":" The square of the distance between two vectors.\n","type":"AltMath.Alternative.Record.Vector2.Vec2 -> AltMath.Alternative.Record.Vector2.Vec2 -> Basics.Float"},{"name":"dot","comment":" The dot product of a and b\n","type":"AltMath.Alternative.Record.Vector2.Vec2 -> AltMath.Alternative.Record.Vector2.Vec2 -> Basics.Float"},{"name":"fromRecord","comment":" Convert a record to a vector.\n","type":"{ x : Basics.Float, y : Basics.Float } -> AltMath.Alternative.Record.Vector2.Vec2"},{"name":"getX","comment":" Extract the x component of a vector.\n","type":"AltMath.Alternative.Record.Vector2.Vec2 -> Basics.Float"},{"name":"getY","comment":" Extract the y component of a vector.\n","type":"AltMath.Alternative.Record.Vector2.Vec2 -> Basics.Float"},{"name":"length","comment":" The length of the given vector: |a|\n","type":"AltMath.Alternative.Record.Vector2.Vec2 -> Basics.Float"},{"name":"lengthSquared","comment":" The square of the length of the given vector: |a| \\* |a|\n","type":"AltMath.Alternative.Record.Vector2.Vec2 -> Basics.Float"},{"name":"mul","comment":" Multiply the vector by a vector: a \\* b\n","type":"AltMath.Alternative.Record.Vector2.Vec2 -> AltMath.Alternative.Record.Vector2.Vec2 -> AltMath.Alternative.Record.Vector2.Vec2"},{"name":"negate","comment":" Vector negation: -a\n","type":"AltMath.Alternative.Record.Vector2.Vec2 -> AltMath.Alternative.Record.Vector2.Vec2"},{"name":"normalize","comment":" A unit vector with the same direction as the given vector: a / |a|\n","type":"AltMath.Alternative.Record.Vector2.Vec2 -> AltMath.Alternative.Record.Vector2.Vec2"},{"name":"scale","comment":" Multiply the vector by a scalar: s \\* v\n","type":"Basics.Float -> AltMath.Alternative.Record.Vector2.Vec2 -> AltMath.Alternative.Record.Vector2.Vec2"},{"name":"setX","comment":" Update the x component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.Record.Vector2.Vec2 -> AltMath.Alternative.Record.Vector2.Vec2"},{"name":"setY","comment":" Update the y component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.Record.Vector2.Vec2 -> AltMath.Alternative.Record.Vector2.Vec2"},{"name":"sub","comment":" Vector subtraction: a - b\n","type":"AltMath.Alternative.Record.Vector2.Vec2 -> AltMath.Alternative.Record.Vector2.Vec2 -> AltMath.Alternative.Record.Vector2.Vec2"},{"name":"toRecord","comment":" Convert a vector to a record.\n","type":"AltMath.Alternative.Record.Vector2.Vec2 -> { x : Basics.Float, y : Basics.Float }"},{"name":"vec2","comment":" Creates a new 2-element vector with the given values.\n","type":"Basics.Float -> Basics.Float -> AltMath.Alternative.Record.Vector2.Vec2"}],"binops":[]},{"name":"AltMath.Alternative.Record.Vector3","comment":"\n\n\n# Create\n\n@docs Vec3, vec3, i, j, k\n\n\n# Get and Set\n\nThe set functions create a new copy of the vector, updating a single field.\n\n@docs getX, getY, getZ, setX, setY, setZ\n\n\n# Operations\n\n@docs add, sub, negate, scale, dot, cross, normalize, direction\n@docs length, lengthSquared, distance, distanceSquared\n\n\n# Conversions\n\n@docs toRecord, fromRecord\n\n","unions":[],"aliases":[{"name":"Vec3","comment":" Three dimensional vector type\n","args":[],"type":"{ x : Basics.Float, y : Basics.Float, z : Basics.Float }"}],"values":[{"name":"add","comment":" Vector addition: a + b\n","type":"AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Vector3.Vec3"},{"name":"cross","comment":" The cross product of a and b\n","type":"AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Vector3.Vec3"},{"name":"direction","comment":" The normalized direction from b to a: (a - b) / |a - b|\n","type":"AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Vector3.Vec3"},{"name":"distance","comment":" The distance between two vectors.\n","type":"AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Vector3.Vec3 -> Basics.Float"},{"name":"distanceSquared","comment":" The square of the distance between two vectors.\n","type":"AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Vector3.Vec3 -> Basics.Float"},{"name":"dot","comment":" The dot product of a and b\n","type":"AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Vector3.Vec3 -> Basics.Float"},{"name":"fromRecord","comment":" Convert a record to a vector.\n","type":"{ x : Basics.Float, y : Basics.Float, z : Basics.Float } -> AltMath.Alternative.Record.Vector3.Vec3"},{"name":"getX","comment":" Extract the x component of a vector.\n","type":"AltMath.Alternative.Record.Vector3.Vec3 -> Basics.Float"},{"name":"getY","comment":" Extract the y component of a vector.\n","type":"AltMath.Alternative.Record.Vector3.Vec3 -> Basics.Float"},{"name":"getZ","comment":" Extract the z component of a vector.\n","type":"AltMath.Alternative.Record.Vector3.Vec3 -> Basics.Float"},{"name":"i","comment":" The unit vector &icirc; which points in the x direction: `vec3 1 0 0`\n","type":"AltMath.Alternative.Record.Vector3.Vec3"},{"name":"j","comment":" The unit vector &jcirc; which points in the y direction: `vec3 0 1 0`\n","type":"AltMath.Alternative.Record.Vector3.Vec3"},{"name":"k","comment":" The unit vector k&#0770; which points in the z direction: `vec3 0 0 1`\n","type":"AltMath.Alternative.Record.Vector3.Vec3"},{"name":"length","comment":" The length of the given vector: |a|\n","type":"AltMath.Alternative.Record.Vector3.Vec3 -> Basics.Float"},{"name":"lengthSquared","comment":" The square of the length of the given vector: |a| \\* |a|\n","type":"AltMath.Alternative.Record.Vector3.Vec3 -> Basics.Float"},{"name":"negate","comment":" Vector negation: -a\n","type":"AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Vector3.Vec3"},{"name":"normalize","comment":" A unit vector with the same direction as the given vector: a / |a|\n","type":"AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Vector3.Vec3"},{"name":"scale","comment":" Multiply the vector by a scalar: s \\* v\n","type":"Basics.Float -> AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Vector3.Vec3"},{"name":"setX","comment":" Update the x component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Vector3.Vec3"},{"name":"setY","comment":" Update the y component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Vector3.Vec3"},{"name":"setZ","comment":" Update the z component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Vector3.Vec3"},{"name":"sub","comment":" Vector subtraction: a - b\n","type":"AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Vector3.Vec3 -> AltMath.Alternative.Record.Vector3.Vec3"},{"name":"toRecord","comment":" Convert a vector to a record.\n","type":"AltMath.Alternative.Record.Vector3.Vec3 -> { x : Basics.Float, y : Basics.Float, z : Basics.Float }"},{"name":"vec3","comment":" Creates a new 3-element vector with the given values.\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.Record.Vector3.Vec3"}],"binops":[]},{"name":"AltMath.Alternative.Record.Vector4","comment":"\n\n\n# Create\n\n@docs Vec4, vec4\n\n\n# Get and Set\n\nThe set functions create a new copy of the vector, updating a single field.\n\n@docs getX, getY, getZ, getW, setX, setY, setZ, setW\n\n\n# Operations\n\n@docs add, sub, negate, scale, dot, normalize, direction\n@docs length, lengthSquared, distance, distanceSquared\n\n\n# Conversions\n\n@docs toRecord, fromRecord\n\n","unions":[],"aliases":[{"name":"Vec4","comment":" Four dimensional vector type\n","args":[],"type":"{ x : Basics.Float, y : Basics.Float, z : Basics.Float, w : Basics.Float }"}],"values":[{"name":"add","comment":" Vector addition: a + b\n","type":"AltMath.Alternative.Record.Vector4.Vec4 -> AltMath.Alternative.Record.Vector4.Vec4 -> AltMath.Alternative.Record.Vector4.Vec4"},{"name":"direction","comment":" The normalized direction from b to a: (a - b) / |a - b|\n","type":"AltMath.Alternative.Record.Vector4.Vec4 -> AltMath.Alternative.Record.Vector4.Vec4 -> AltMath.Alternative.Record.Vector4.Vec4"},{"name":"distance","comment":" The distance between two vectors.\n","type":"AltMath.Alternative.Record.Vector4.Vec4 -> AltMath.Alternative.Record.Vector4.Vec4 -> Basics.Float"},{"name":"distanceSquared","comment":" The square of the distance between two vectors.\n","type":"AltMath.Alternative.Record.Vector4.Vec4 -> AltMath.Alternative.Record.Vector4.Vec4 -> Basics.Float"},{"name":"dot","comment":" The dot product of a and b\n","type":"AltMath.Alternative.Record.Vector4.Vec4 -> AltMath.Alternative.Record.Vector4.Vec4 -> Basics.Float"},{"name":"fromRecord","comment":" Convert a record to a vector.\n","type":"{ x : Basics.Float, y : Basics.Float, z : Basics.Float, w : Basics.Float } -> AltMath.Alternative.Record.Vector4.Vec4"},{"name":"getW","comment":" Extract the w component of a vector.\n","type":"AltMath.Alternative.Record.Vector4.Vec4 -> Basics.Float"},{"name":"getX","comment":" Extract the x component of a vector.\n","type":"AltMath.Alternative.Record.Vector4.Vec4 -> Basics.Float"},{"name":"getY","comment":" Extract the y component of a vector.\n","type":"AltMath.Alternative.Record.Vector4.Vec4 -> Basics.Float"},{"name":"getZ","comment":" Extract the z component of a vector.\n","type":"AltMath.Alternative.Record.Vector4.Vec4 -> Basics.Float"},{"name":"length","comment":" The length of the given vector: |a|\n","type":"AltMath.Alternative.Record.Vector4.Vec4 -> Basics.Float"},{"name":"lengthSquared","comment":" The square of the length of the given vector: |a| \\* |a|\n","type":"AltMath.Alternative.Record.Vector4.Vec4 -> Basics.Float"},{"name":"negate","comment":" Vector negation: -a\n","type":"AltMath.Alternative.Record.Vector4.Vec4 -> AltMath.Alternative.Record.Vector4.Vec4"},{"name":"normalize","comment":" A unit vector with the same direction as the given vector: a / |a|\n","type":"AltMath.Alternative.Record.Vector4.Vec4 -> AltMath.Alternative.Record.Vector4.Vec4"},{"name":"scale","comment":" Multiply the vector by a scalar: s \\* v\n","type":"Basics.Float -> AltMath.Alternative.Record.Vector4.Vec4 -> AltMath.Alternative.Record.Vector4.Vec4"},{"name":"setW","comment":" Update the w component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.Record.Vector4.Vec4 -> AltMath.Alternative.Record.Vector4.Vec4"},{"name":"setX","comment":" Update the x component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.Record.Vector4.Vec4 -> AltMath.Alternative.Record.Vector4.Vec4"},{"name":"setY","comment":" Update the y component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.Record.Vector4.Vec4 -> AltMath.Alternative.Record.Vector4.Vec4"},{"name":"setZ","comment":" Update the z component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.Record.Vector4.Vec4 -> AltMath.Alternative.Record.Vector4.Vec4"},{"name":"sub","comment":" Vector subtraction: a - b\n","type":"AltMath.Alternative.Record.Vector4.Vec4 -> AltMath.Alternative.Record.Vector4.Vec4 -> AltMath.Alternative.Record.Vector4.Vec4"},{"name":"toRecord","comment":" Convert a vector to a record.\n","type":"AltMath.Alternative.Record.Vector4.Vec4 -> { x : Basics.Float, y : Basics.Float, z : Basics.Float, w : Basics.Float }"},{"name":"vec4","comment":" Creates a new 4-element vector with the given x, y, z, and w values.\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.Record.Vector4.Vec4"}],"binops":[]},{"name":"AltMath.Alternative.Tuple.Matrix4","comment":" This library uses the convention that the prefix `make` is creating a new\narray,as without the prefix, you are applying some transform to an\nexisting matrix.\n\n\n# Create\n\n@docs Mat4, identity\n\n\n# Operations\n\n@docs inverse, inverseOrthonormal, mul, mulAffine, transpose, makeBasis, transform\n\n\n# Projections\n\n@docs makeFrustum, makePerspective, makeOrtho, makeOrtho2D, makeLookAt\n\n\n# Apply Transformations\n\n@docs rotate, scale, scale3, translate, translate3\n\n\n# Create Transformations\n\n@docs makeRotate, makeScale, makeScale3, makeTranslate, makeTranslate3\n\n\n# Conversions\n\n@docs toRecord, fromRecord, Matrix4Record\n\n","unions":[],"aliases":[{"name":"Mat4","comment":" 4x4 matrix type\n","args":[],"type":"( ( ( ( Basics.Float, Basics.Float ), ( Basics.Float, Basics.Float ) ), ( ( Basics.Float, Basics.Float ), ( Basics.Float, Basics.Float ) ) ), ( ( ( Basics.Float, Basics.Float ), ( Basics.Float, Basics.Float ) ), ( ( Basics.Float, Basics.Float ), ( Basics.Float, Basics.Float ) ) ) )"},{"name":"Matrix4Record","comment":" Just type alias for matrix record\n","args":[],"type":"{ m11 : Basics.Float, m21 : Basics.Float, m31 : Basics.Float, m41 : Basics.Float, m12 : Basics.Float, m22 : Basics.Float, m32 : Basics.Float, m42 : Basics.Float, m13 : Basics.Float, m23 : Basics.Float, m33 : Basics.Float, m43 : Basics.Float, m14 : Basics.Float, m24 : Basics.Float, m34 : Basics.Float, m44 : Basics.Float }"}],"values":[{"name":"fromRecord","comment":" Convert a record to a matrix.\n","type":"AltMath.Alternative.Tuple.Matrix4.Matrix4Record -> AltMath.Alternative.Tuple.Matrix4.Mat4"},{"name":"identity","comment":" A matrix with all 0s, except 1s on the diagonal.\n","type":"AltMath.Alternative.Tuple.Matrix4.Mat4"},{"name":"inverse","comment":" Computes the inverse of any matrix. This is somewhat computationally\nintensive. If the matrix is not invertible, `Nothing` is returned.\n","type":"AltMath.Alternative.Tuple.Matrix4.Mat4 -> Maybe.Maybe AltMath.Alternative.Tuple.Matrix4.Mat4"},{"name":"inverseOrthonormal","comment":" Computes the inverse of the given matrix, assuming that the matrix is\northonormal. This algorithm is more efficient than general matrix inversion, and\nhas no possibility of failing.\n","type":"AltMath.Alternative.Tuple.Matrix4.Mat4 -> AltMath.Alternative.Tuple.Matrix4.Mat4"},{"name":"makeBasis","comment":" Creates a transform from a basis consisting of 3 linearly independent vectors.\n","type":"AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Matrix4.Mat4"},{"name":"makeFrustum","comment":" Creates a matrix for a projection frustum with the given parameters.\n\nParameters:\n\n  - left - the left coordinate of the frustum\n  - right- the right coordinate of the frustum\n  - bottom - the bottom coordinate of the frustum\n  - top - the top coordinate of the frustum\n  - znear - the near z distance of the frustum\n  - zfar - the far z distance of the frustum\n\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.Tuple.Matrix4.Mat4"},{"name":"makeLookAt","comment":" Creates a transformation matrix for a camera.\n\nParameters:\n\n  - eye - The location of the camera\n  - center - The location of the focused object\n  - up - The \"up\" direction according to the camera\n\n","type":"AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Matrix4.Mat4"},{"name":"makeOrtho","comment":" Creates a matrix for an orthogonal frustum projection with the given parameters.\n\nParameters:\n\n  - left - the left coordinate of the frustum\n  - right- the right coordinate of the frustum\n  - bottom - the bottom coordinate of the frustum\n  - top - the top coordinate of the frustum\n  - znear - the near z distance of the frustum\n  - zfar - the far z distance of the frustum\n\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.Tuple.Matrix4.Mat4"},{"name":"makeOrtho2D","comment":" Creates a matrix for a 2D orthogonal frustum projection with the given\nparameters. `znear` and `zfar` are assumed to be -1 and 1, respectively.\n\nParameters:\n\n  - left - the left coordinate of the frustum\n  - right- the right coordinate of the frustum\n  - bottom - the bottom coordinate of the frustum\n  - top - the top coordinate of the frustum\n\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.Tuple.Matrix4.Mat4"},{"name":"makePerspective","comment":" Creates a matrix for a perspective projection with the given parameters.\n\nParameters:\n\n  - fovy - field of view in the y axis, in degrees\n  - aspect - aspect ratio\n  - znear - the near z distance of the projection\n  - zfar - the far z distance of the projection\n\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.Tuple.Matrix4.Mat4"},{"name":"makeRotate","comment":" Creates a transformation matrix for rotation in radians about the\n3-element vector axis.\n","type":"Basics.Float -> AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Matrix4.Mat4"},{"name":"makeScale","comment":" Creates a transformation matrix for scaling each of the x, y, and z axes by\nthe amount given in the corresponding element of the 3-element vector.\n","type":"AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Matrix4.Mat4"},{"name":"makeScale3","comment":" Creates a transformation matrix for scaling by 3 scalar values, one for\neach of the x, y, and z directions.\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.Tuple.Matrix4.Mat4"},{"name":"makeTranslate","comment":" Creates a transformation matrix for translating each of the x, y, and z\naxes by the amount given in the corresponding element of the 3-element vector.\n","type":"AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Matrix4.Mat4"},{"name":"makeTranslate3","comment":" Creates a transformation matrix for translating by 3 scalar values, one for\neach of the x, y, and z directions.\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.Tuple.Matrix4.Mat4"},{"name":"mul","comment":" Matrix multiplcation: a \\* b\n","type":"AltMath.Alternative.Tuple.Matrix4.Mat4 -> AltMath.Alternative.Tuple.Matrix4.Mat4 -> AltMath.Alternative.Tuple.Matrix4.Mat4"},{"name":"mulAffine","comment":" Matrix multiplication, assuming a and b are affine: a \\* b\n","type":"AltMath.Alternative.Tuple.Matrix4.Mat4 -> AltMath.Alternative.Tuple.Matrix4.Mat4 -> AltMath.Alternative.Tuple.Matrix4.Mat4"},{"name":"rotate","comment":" Concatenates a rotation in radians about an axis to the given matrix.\n","type":"Basics.Float -> AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Matrix4.Mat4 -> AltMath.Alternative.Tuple.Matrix4.Mat4"},{"name":"scale","comment":" Concatenates a scaling to the given matrix.\n","type":"AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Matrix4.Mat4 -> AltMath.Alternative.Tuple.Matrix4.Mat4"},{"name":"scale3","comment":" Concatenates a scaling to the given matrix.\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.Tuple.Matrix4.Mat4 -> AltMath.Alternative.Tuple.Matrix4.Mat4"},{"name":"toRecord","comment":" Convert a matrix to a record. Elements are given by their row and column indices, starting at 1, so `m23` means the element in the second row, third column.\n","type":"AltMath.Alternative.Tuple.Matrix4.Mat4 -> AltMath.Alternative.Tuple.Matrix4.Matrix4Record"},{"name":"transform","comment":" Multiply a vector by a 4x4 matrix: m \\* v\n","type":"AltMath.Alternative.Tuple.Matrix4.Mat4 -> AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Vector3.Vec3"},{"name":"translate","comment":" Concatenates a translation to the given matrix.\n","type":"AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Matrix4.Mat4 -> AltMath.Alternative.Tuple.Matrix4.Mat4"},{"name":"translate3","comment":" Concatenates a translation to the given matrix.\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.Tuple.Matrix4.Mat4 -> AltMath.Alternative.Tuple.Matrix4.Mat4"},{"name":"transpose","comment":" \"Flip\" the matrix across the diagonal by swapping row index and column\nindex.\n","type":"AltMath.Alternative.Tuple.Matrix4.Mat4 -> AltMath.Alternative.Tuple.Matrix4.Mat4"}],"binops":[]},{"name":"AltMath.Alternative.Tuple.Vector2","comment":"\n\n\n# Create\n\n@docs Vec2, vec2\n\n\n# Get and Set\n\nThe set functions create a new copy of the vector, updating a single field.\n\n@docs getX, getY, setX, setY\n\n\n# Operations\n\n@docs add, sub, negate, scale, dot, normalize, direction, mul\n@docs length, lengthSquared, distance, distanceSquared\n\n\n# Conversions\n\n@docs toRecord, fromRecord\n\n","unions":[],"aliases":[{"name":"Vec2","comment":" Two dimensional vector type\n","args":[],"type":"( Basics.Float, Basics.Float )"}],"values":[{"name":"add","comment":" Vector addition: a + b\n","type":"AltMath.Alternative.Tuple.Vector2.Vec2 -> AltMath.Alternative.Tuple.Vector2.Vec2 -> AltMath.Alternative.Tuple.Vector2.Vec2"},{"name":"direction","comment":" The normalized direction from b to a: (a - b) / |a - b|\n","type":"AltMath.Alternative.Tuple.Vector2.Vec2 -> AltMath.Alternative.Tuple.Vector2.Vec2 -> AltMath.Alternative.Tuple.Vector2.Vec2"},{"name":"distance","comment":" The distance between two vectors.\n","type":"AltMath.Alternative.Tuple.Vector2.Vec2 -> AltMath.Alternative.Tuple.Vector2.Vec2 -> Basics.Float"},{"name":"distanceSquared","comment":" The square of the distance between two vectors.\n","type":"AltMath.Alternative.Tuple.Vector2.Vec2 -> AltMath.Alternative.Tuple.Vector2.Vec2 -> Basics.Float"},{"name":"dot","comment":" The dot product of a and b\n","type":"AltMath.Alternative.Tuple.Vector2.Vec2 -> AltMath.Alternative.Tuple.Vector2.Vec2 -> Basics.Float"},{"name":"fromRecord","comment":" Convert a record to a vector.\n","type":"{ x : Basics.Float, y : Basics.Float } -> AltMath.Alternative.Tuple.Vector2.Vec2"},{"name":"getX","comment":" Extract the x component of a vector.\n","type":"AltMath.Alternative.Tuple.Vector2.Vec2 -> Basics.Float"},{"name":"getY","comment":" Extract the y component of a vector.\n","type":"AltMath.Alternative.Tuple.Vector2.Vec2 -> Basics.Float"},{"name":"length","comment":" The length of the given vector: |a|\n","type":"AltMath.Alternative.Tuple.Vector2.Vec2 -> Basics.Float"},{"name":"lengthSquared","comment":" The square of the length of the given vector: |a| \\* |a|\n","type":"AltMath.Alternative.Tuple.Vector2.Vec2 -> Basics.Float"},{"name":"mul","comment":" Multiply the vector by a vector: a \\* b\n","type":"AltMath.Alternative.Tuple.Vector2.Vec2 -> AltMath.Alternative.Tuple.Vector2.Vec2 -> AltMath.Alternative.Tuple.Vector2.Vec2"},{"name":"negate","comment":" Vector negation: -a\n","type":"AltMath.Alternative.Tuple.Vector2.Vec2 -> AltMath.Alternative.Tuple.Vector2.Vec2"},{"name":"normalize","comment":" A unit vector with the same direction as the given vector: a / |a|\n","type":"AltMath.Alternative.Tuple.Vector2.Vec2 -> AltMath.Alternative.Tuple.Vector2.Vec2"},{"name":"scale","comment":" Multiply the vector by a scalar: s \\* v\n","type":"Basics.Float -> AltMath.Alternative.Tuple.Vector2.Vec2 -> AltMath.Alternative.Tuple.Vector2.Vec2"},{"name":"setX","comment":" Update the x component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.Tuple.Vector2.Vec2 -> AltMath.Alternative.Tuple.Vector2.Vec2"},{"name":"setY","comment":" Update the y component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.Tuple.Vector2.Vec2 -> AltMath.Alternative.Tuple.Vector2.Vec2"},{"name":"sub","comment":" Vector subtraction: a - b\n","type":"AltMath.Alternative.Tuple.Vector2.Vec2 -> AltMath.Alternative.Tuple.Vector2.Vec2 -> AltMath.Alternative.Tuple.Vector2.Vec2"},{"name":"toRecord","comment":" Convert a vector to a record.\n","type":"AltMath.Alternative.Tuple.Vector2.Vec2 -> { x : Basics.Float, y : Basics.Float }"},{"name":"vec2","comment":" Creates a new 2-element vector with the given values.\n","type":"Basics.Float -> Basics.Float -> AltMath.Alternative.Tuple.Vector2.Vec2"}],"binops":[]},{"name":"AltMath.Alternative.Tuple.Vector3","comment":"\n\n\n# Create\n\n@docs Vec3, vec3, i, j, k\n\n\n# Get and Set\n\nThe set functions create a new copy of the vector, updating a single field.\n\n@docs getX, getY, getZ, setX, setY, setZ\n\n\n# Operations\n\n@docs add, sub, negate, scale, dot, cross, normalize, direction\n@docs length, lengthSquared, distance, distanceSquared\n\n\n# Conversions\n\n@docs toRecord, fromRecord\n\n","unions":[],"aliases":[{"name":"Vec3","comment":" Three dimensional vector type\n","args":[],"type":"( Basics.Float, Basics.Float, Basics.Float )"}],"values":[{"name":"add","comment":" Vector addition: a + b\n","type":"AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Vector3.Vec3"},{"name":"cross","comment":" The cross product of a and b\n","type":"AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Vector3.Vec3"},{"name":"direction","comment":" The normalized direction from b to a: (a - b) / |a - b|\n","type":"AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Vector3.Vec3"},{"name":"distance","comment":" The distance between two vectors.\n","type":"AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Vector3.Vec3 -> Basics.Float"},{"name":"distanceSquared","comment":" The square of the distance between two vectors.\n","type":"AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Vector3.Vec3 -> Basics.Float"},{"name":"dot","comment":" The dot product of a and b\n","type":"AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Vector3.Vec3 -> Basics.Float"},{"name":"fromRecord","comment":" Convert a record to a vector.\n","type":"{ x : Basics.Float, y : Basics.Float, z : Basics.Float } -> AltMath.Alternative.Tuple.Vector3.Vec3"},{"name":"getX","comment":" Extract the x component of a vector.\n","type":"AltMath.Alternative.Tuple.Vector3.Vec3 -> Basics.Float"},{"name":"getY","comment":" Extract the y component of a vector.\n","type":"AltMath.Alternative.Tuple.Vector3.Vec3 -> Basics.Float"},{"name":"getZ","comment":" Extract the z component of a vector.\n","type":"AltMath.Alternative.Tuple.Vector3.Vec3 -> Basics.Float"},{"name":"i","comment":" The unit vector &icirc; which points in the x direction: `vec3 1 0 0`\n","type":"AltMath.Alternative.Tuple.Vector3.Vec3"},{"name":"j","comment":" The unit vector &jcirc; which points in the y direction: `vec3 0 1 0`\n","type":"AltMath.Alternative.Tuple.Vector3.Vec3"},{"name":"k","comment":" The unit vector k&#0770; which points in the z direction: `vec3 0 0 1`\n","type":"AltMath.Alternative.Tuple.Vector3.Vec3"},{"name":"length","comment":" The length of the given vector: |a|\n","type":"AltMath.Alternative.Tuple.Vector3.Vec3 -> Basics.Float"},{"name":"lengthSquared","comment":" The square of the length of the given vector: |a| \\* |a|\n","type":"AltMath.Alternative.Tuple.Vector3.Vec3 -> Basics.Float"},{"name":"negate","comment":" Vector negation: -a\n","type":"AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Vector3.Vec3"},{"name":"normalize","comment":" A unit vector with the same direction as the given vector: a / |a|\n","type":"AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Vector3.Vec3"},{"name":"scale","comment":" Multiply the vector by a scalar: s \\* v\n","type":"Basics.Float -> AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Vector3.Vec3"},{"name":"setX","comment":" Update the x component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Vector3.Vec3"},{"name":"setY","comment":" Update the y component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Vector3.Vec3"},{"name":"setZ","comment":" Update the z component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Vector3.Vec3"},{"name":"sub","comment":" Vector subtraction: a - b\n","type":"AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Vector3.Vec3 -> AltMath.Alternative.Tuple.Vector3.Vec3"},{"name":"toRecord","comment":" Convert a vector to a record.\n","type":"AltMath.Alternative.Tuple.Vector3.Vec3 -> { x : Basics.Float, y : Basics.Float, z : Basics.Float }"},{"name":"vec3","comment":" Creates a new 3-element vector with the given values.\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.Tuple.Vector3.Vec3"}],"binops":[]},{"name":"AltMath.Alternative.Tuple.Vector4","comment":"\n\n\n# Create\n\n@docs Vec4, vec4\n\n\n# Get and Set\n\nThe set functions create a new copy of the vector, updating a single field.\n\n@docs getX, getY, getZ, getW, setX, setY, setZ, setW\n\n\n# Operations\n\n@docs add, sub, negate, scale, dot, normalize, direction\n@docs length, lengthSquared, distance, distanceSquared\n\n\n# Conversions\n\n@docs toRecord, fromRecord\n\n","unions":[],"aliases":[{"name":"Vec4","comment":" Four dimensional vector type\n","args":[],"type":"( ( Basics.Float, Basics.Float ), ( Basics.Float, Basics.Float ) )"}],"values":[{"name":"add","comment":" Vector addition: a + b\n","type":"AltMath.Alternative.Tuple.Vector4.Vec4 -> AltMath.Alternative.Tuple.Vector4.Vec4 -> AltMath.Alternative.Tuple.Vector4.Vec4"},{"name":"direction","comment":" The normalized direction from b to a: (a - b) / |a - b|\n","type":"AltMath.Alternative.Tuple.Vector4.Vec4 -> AltMath.Alternative.Tuple.Vector4.Vec4 -> AltMath.Alternative.Tuple.Vector4.Vec4"},{"name":"distance","comment":" The distance between two vectors.\n","type":"AltMath.Alternative.Tuple.Vector4.Vec4 -> AltMath.Alternative.Tuple.Vector4.Vec4 -> Basics.Float"},{"name":"distanceSquared","comment":" The square of the distance between two vectors.\n","type":"AltMath.Alternative.Tuple.Vector4.Vec4 -> AltMath.Alternative.Tuple.Vector4.Vec4 -> Basics.Float"},{"name":"dot","comment":" The dot product of a and b\n","type":"AltMath.Alternative.Tuple.Vector4.Vec4 -> AltMath.Alternative.Tuple.Vector4.Vec4 -> Basics.Float"},{"name":"fromRecord","comment":" Convert a record to a vector.\n","type":"{ x : Basics.Float, y : Basics.Float, z : Basics.Float, w : Basics.Float } -> AltMath.Alternative.Tuple.Vector4.Vec4"},{"name":"getW","comment":" Extract the w component of a vector.\n","type":"AltMath.Alternative.Tuple.Vector4.Vec4 -> Basics.Float"},{"name":"getX","comment":" Extract the x component of a vector.\n","type":"AltMath.Alternative.Tuple.Vector4.Vec4 -> Basics.Float"},{"name":"getY","comment":" Extract the y component of a vector.\n","type":"AltMath.Alternative.Tuple.Vector4.Vec4 -> Basics.Float"},{"name":"getZ","comment":" Extract the z component of a vector.\n","type":"AltMath.Alternative.Tuple.Vector4.Vec4 -> Basics.Float"},{"name":"length","comment":" The length of the given vector: |a|\n","type":"AltMath.Alternative.Tuple.Vector4.Vec4 -> Basics.Float"},{"name":"lengthSquared","comment":" The square of the length of the given vector: |a| \\* |a|\n","type":"AltMath.Alternative.Tuple.Vector4.Vec4 -> Basics.Float"},{"name":"negate","comment":" Vector negation: -a\n","type":"AltMath.Alternative.Tuple.Vector4.Vec4 -> AltMath.Alternative.Tuple.Vector4.Vec4"},{"name":"normalize","comment":" A unit vector with the same direction as the given vector: a / |a|\n","type":"AltMath.Alternative.Tuple.Vector4.Vec4 -> AltMath.Alternative.Tuple.Vector4.Vec4"},{"name":"scale","comment":" Multiply the vector by a scalar: s \\* v\n","type":"Basics.Float -> AltMath.Alternative.Tuple.Vector4.Vec4 -> AltMath.Alternative.Tuple.Vector4.Vec4"},{"name":"setW","comment":" Update the w component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.Tuple.Vector4.Vec4 -> AltMath.Alternative.Tuple.Vector4.Vec4"},{"name":"setX","comment":" Update the x component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.Tuple.Vector4.Vec4 -> AltMath.Alternative.Tuple.Vector4.Vec4"},{"name":"setY","comment":" Update the y component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.Tuple.Vector4.Vec4 -> AltMath.Alternative.Tuple.Vector4.Vec4"},{"name":"setZ","comment":" Update the z component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Alternative.Tuple.Vector4.Vec4 -> AltMath.Alternative.Tuple.Vector4.Vec4"},{"name":"sub","comment":" Vector subtraction: a - b\n","type":"AltMath.Alternative.Tuple.Vector4.Vec4 -> AltMath.Alternative.Tuple.Vector4.Vec4 -> AltMath.Alternative.Tuple.Vector4.Vec4"},{"name":"toRecord","comment":" Convert a vector to a record.\n","type":"AltMath.Alternative.Tuple.Vector4.Vec4 -> { x : Basics.Float, y : Basics.Float, z : Basics.Float, w : Basics.Float }"},{"name":"vec4","comment":" Creates a new 4-element vector with the given x, y, z, and w values.\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Alternative.Tuple.Vector4.Vec4"}],"binops":[]},{"name":"AltMath.Matrix4","comment":" This library uses the convention that the prefix `make` is creating a new\narray,as without the prefix, you are applying some transform to an\nexisting matrix.\n\n\n# Create\n\n@docs Mat4, identity\n\n\n# Operations\n\n@docs inverse, inverseOrthonormal, mul, mulAffine, transpose, makeBasis, transform\n\n\n# Projections\n\n@docs makeFrustum, makePerspective, makeOrtho, makeOrtho2D, makeLookAt\n\n\n# Apply Transformations\n\n@docs rotate, scale, scale3, translate, translate3\n\n\n# Create Transformations\n\n@docs makeRotate, makeScale, makeScale3, makeTranslate, makeTranslate3\n\n\n# Conversions\n\n@docs toRecord, fromRecord, Matrix4Record\n\n","unions":[],"aliases":[{"name":"Mat4","comment":" 4x4 matrix type\n","args":[],"type":"AltMath.Alternative.Record.Matrix4.Mat4"},{"name":"Matrix4Record","comment":" Just type alias for matrix record\n","args":[],"type":"{ m11 : Basics.Float, m21 : Basics.Float, m31 : Basics.Float, m41 : Basics.Float, m12 : Basics.Float, m22 : Basics.Float, m32 : Basics.Float, m42 : Basics.Float, m13 : Basics.Float, m23 : Basics.Float, m33 : Basics.Float, m43 : Basics.Float, m14 : Basics.Float, m24 : Basics.Float, m34 : Basics.Float, m44 : Basics.Float }"}],"values":[{"name":"fromRecord","comment":" Convert a record to a matrix.\n","type":"AltMath.Matrix4.Matrix4Record -> AltMath.Matrix4.Mat4"},{"name":"identity","comment":" A matrix with all 0s, except 1s on the diagonal.\n","type":"AltMath.Matrix4.Mat4"},{"name":"inverse","comment":" Computes the inverse of any matrix. This is somewhat computationally\nintensive. If the matrix is not invertible, `Nothing` is returned.\n","type":"AltMath.Matrix4.Mat4 -> Maybe.Maybe AltMath.Matrix4.Mat4"},{"name":"inverseOrthonormal","comment":" Computes the inverse of the given matrix, assuming that the matrix is\northonormal. This algorithm is more efficient than general matrix inversion, and\nhas no possibility of failing.\n","type":"AltMath.Matrix4.Mat4 -> AltMath.Matrix4.Mat4"},{"name":"makeBasis","comment":" Creates a transform from a basis consisting of 3 linearly independent vectors.\n","type":"AltMath.Vector3.Vec3 -> AltMath.Vector3.Vec3 -> AltMath.Vector3.Vec3 -> AltMath.Matrix4.Mat4"},{"name":"makeFrustum","comment":" Creates a matrix for a projection frustum with the given parameters.\n\nParameters:\n\n  - left - the left coordinate of the frustum\n  - right- the right coordinate of the frustum\n  - bottom - the bottom coordinate of the frustum\n  - top - the top coordinate of the frustum\n  - znear - the near z distance of the frustum\n  - zfar - the far z distance of the frustum\n\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Matrix4.Mat4"},{"name":"makeLookAt","comment":" Creates a transformation matrix for a camera.\n\nParameters:\n\n  - eye - The location of the camera\n  - center - The location of the focused object\n  - up - The \"up\" direction according to the camera\n\n","type":"AltMath.Vector3.Vec3 -> AltMath.Vector3.Vec3 -> AltMath.Vector3.Vec3 -> AltMath.Matrix4.Mat4"},{"name":"makeOrtho","comment":" Creates a matrix for an orthogonal frustum projection with the given parameters.\n\nParameters:\n\n  - left - the left coordinate of the frustum\n  - right- the right coordinate of the frustum\n  - bottom - the bottom coordinate of the frustum\n  - top - the top coordinate of the frustum\n  - znear - the near z distance of the frustum\n  - zfar - the far z distance of the frustum\n\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Matrix4.Mat4"},{"name":"makeOrtho2D","comment":" Creates a matrix for a 2D orthogonal frustum projection with the given\nparameters. `znear` and `zfar` are assumed to be -1 and 1, respectively.\n\nParameters:\n\n  - left - the left coordinate of the frustum\n  - right- the right coordinate of the frustum\n  - bottom - the bottom coordinate of the frustum\n  - top - the top coordinate of the frustum\n\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Matrix4.Mat4"},{"name":"makePerspective","comment":" Creates a matrix for a perspective projection with the given parameters.\n\nParameters:\n\n  - fovy - field of view in the y axis, in degrees\n  - aspect - aspect ratio\n  - znear - the near z distance of the projection\n  - zfar - the far z distance of the projection\n\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Matrix4.Mat4"},{"name":"makeRotate","comment":" Creates a transformation matrix for rotation in radians about the\n3-element vector axis.\n","type":"Basics.Float -> AltMath.Vector3.Vec3 -> AltMath.Matrix4.Mat4"},{"name":"makeScale","comment":" Creates a transformation matrix for scaling each of the x, y, and z axes by\nthe amount given in the corresponding element of the 3-element vector.\n","type":"AltMath.Vector3.Vec3 -> AltMath.Matrix4.Mat4"},{"name":"makeScale3","comment":" Creates a transformation matrix for scaling by 3 scalar values, one for\neach of the x, y, and z directions.\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Matrix4.Mat4"},{"name":"makeTranslate","comment":" Creates a transformation matrix for translating each of the x, y, and z\naxes by the amount given in the corresponding element of the 3-element vector.\n","type":"AltMath.Vector3.Vec3 -> AltMath.Matrix4.Mat4"},{"name":"makeTranslate3","comment":" Creates a transformation matrix for translating by 3 scalar values, one for\neach of the x, y, and z directions.\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Matrix4.Mat4"},{"name":"mul","comment":" Matrix multiplcation: a \\* b\n","type":"AltMath.Matrix4.Mat4 -> AltMath.Matrix4.Mat4 -> AltMath.Matrix4.Mat4"},{"name":"mulAffine","comment":" Matrix multiplication, assuming a and b are affine: a \\* b\n","type":"AltMath.Matrix4.Mat4 -> AltMath.Matrix4.Mat4 -> AltMath.Matrix4.Mat4"},{"name":"rotate","comment":" Concatenates a rotation in radians about an axis to the given matrix.\n","type":"Basics.Float -> AltMath.Vector3.Vec3 -> AltMath.Matrix4.Mat4 -> AltMath.Matrix4.Mat4"},{"name":"scale","comment":" Concatenates a scaling to the given matrix.\n","type":"AltMath.Vector3.Vec3 -> AltMath.Matrix4.Mat4 -> AltMath.Matrix4.Mat4"},{"name":"scale3","comment":" Concatenates a scaling to the given matrix.\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Matrix4.Mat4 -> AltMath.Matrix4.Mat4"},{"name":"toRecord","comment":" Convert a matrix to a record. Elements are given by their row and column indices, starting at 1, so `m23` means the element in the second row, third column.\n","type":"AltMath.Matrix4.Mat4 -> AltMath.Matrix4.Matrix4Record"},{"name":"transform","comment":" Multiply a vector by a 4x4 matrix: m \\* v\n","type":"AltMath.Matrix4.Mat4 -> AltMath.Vector3.Vec3 -> AltMath.Vector3.Vec3"},{"name":"translate","comment":" Concatenates a translation to the given matrix.\n","type":"AltMath.Vector3.Vec3 -> AltMath.Matrix4.Mat4 -> AltMath.Matrix4.Mat4"},{"name":"translate3","comment":" Concatenates a translation to the given matrix.\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Matrix4.Mat4 -> AltMath.Matrix4.Mat4"},{"name":"transpose","comment":" \"Flip\" the matrix across the diagonal by swapping row index and column\nindex.\n","type":"AltMath.Matrix4.Mat4 -> AltMath.Matrix4.Mat4"}],"binops":[]},{"name":"AltMath.Vector2","comment":"\n\n\n# Create\n\n@docs Vec2, vec2\n\n\n# Get and Set\n\nThe set functions create a new copy of the vector, updating a single field.\n\n@docs getX, getY, setX, setY\n\n\n# Operations\n\n@docs add, sub, negate, scale, dot, normalize, direction, mul\n@docs length, lengthSquared, distance, distanceSquared\n\n\n# Conversions\n\n@docs toRecord, fromRecord\n\n","unions":[],"aliases":[{"name":"Vec2","comment":" Two dimensional vector type\n","args":[],"type":"AltMath.Alternative.Record.Vector2.Vec2"}],"values":[{"name":"add","comment":" Vector addition: a + b\n","type":"AltMath.Vector2.Vec2 -> AltMath.Vector2.Vec2 -> AltMath.Vector2.Vec2"},{"name":"direction","comment":" The normalized direction from b to a: (a - b) / |a - b|\n","type":"AltMath.Vector2.Vec2 -> AltMath.Vector2.Vec2 -> AltMath.Vector2.Vec2"},{"name":"distance","comment":" The distance between two vectors.\n","type":"AltMath.Vector2.Vec2 -> AltMath.Vector2.Vec2 -> Basics.Float"},{"name":"distanceSquared","comment":" The square of the distance between two vectors.\n","type":"AltMath.Vector2.Vec2 -> AltMath.Vector2.Vec2 -> Basics.Float"},{"name":"dot","comment":" The dot product of a and b\n","type":"AltMath.Vector2.Vec2 -> AltMath.Vector2.Vec2 -> Basics.Float"},{"name":"fromRecord","comment":" Convert a record to a vector.\n","type":"{ x : Basics.Float, y : Basics.Float } -> AltMath.Vector2.Vec2"},{"name":"getX","comment":" Extract the x component of a vector.\n","type":"AltMath.Vector2.Vec2 -> Basics.Float"},{"name":"getY","comment":" Extract the y component of a vector.\n","type":"AltMath.Vector2.Vec2 -> Basics.Float"},{"name":"length","comment":" The length of the given vector: |a|\n","type":"AltMath.Vector2.Vec2 -> Basics.Float"},{"name":"lengthSquared","comment":" The square of the length of the given vector: |a| \\* |a|\n","type":"AltMath.Vector2.Vec2 -> Basics.Float"},{"name":"mul","comment":" Multiply the vector by a vector: a \\* b\n","type":"AltMath.Vector2.Vec2 -> AltMath.Vector2.Vec2 -> AltMath.Vector2.Vec2"},{"name":"negate","comment":" Vector negation: -a\n","type":"AltMath.Vector2.Vec2 -> AltMath.Vector2.Vec2"},{"name":"normalize","comment":" A unit vector with the same direction as the given vector: a / |a|\n","type":"AltMath.Vector2.Vec2 -> AltMath.Vector2.Vec2"},{"name":"scale","comment":" Multiply the vector by a scalar: s \\* v\n","type":"Basics.Float -> AltMath.Vector2.Vec2 -> AltMath.Vector2.Vec2"},{"name":"setX","comment":" Update the x component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Vector2.Vec2 -> AltMath.Vector2.Vec2"},{"name":"setY","comment":" Update the y component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Vector2.Vec2 -> AltMath.Vector2.Vec2"},{"name":"sub","comment":" Vector subtraction: a - b\n","type":"AltMath.Vector2.Vec2 -> AltMath.Vector2.Vec2 -> AltMath.Vector2.Vec2"},{"name":"toRecord","comment":" Convert a vector to a record.\n","type":"AltMath.Vector2.Vec2 -> { x : Basics.Float, y : Basics.Float }"},{"name":"vec2","comment":" Creates a new 2-element vector with the given values.\n","type":"Basics.Float -> Basics.Float -> AltMath.Vector2.Vec2"}],"binops":[]},{"name":"AltMath.Vector3","comment":"\n\n\n# Create\n\n@docs Vec3, vec3, i, j, k\n\n\n# Get and Set\n\nThe set functions create a new copy of the vector, updating a single field.\n\n@docs getX, getY, getZ, setX, setY, setZ\n\n\n# Operations\n\n@docs add, sub, negate, scale, dot, cross, normalize, direction\n@docs length, lengthSquared, distance, distanceSquared\n\n\n# Conversions\n\n@docs toRecord, fromRecord\n\n","unions":[],"aliases":[{"name":"Vec3","comment":" Three dimensional vector type\n","args":[],"type":"AltMath.Alternative.Record.Vector3.Vec3"}],"values":[{"name":"add","comment":" Vector addition: a + b\n","type":"AltMath.Vector3.Vec3 -> AltMath.Vector3.Vec3 -> AltMath.Vector3.Vec3"},{"name":"cross","comment":" The cross product of a and b\n","type":"AltMath.Vector3.Vec3 -> AltMath.Vector3.Vec3 -> AltMath.Vector3.Vec3"},{"name":"direction","comment":" The normalized direction from b to a: (a - b) / |a - b|\n","type":"AltMath.Vector3.Vec3 -> AltMath.Vector3.Vec3 -> AltMath.Vector3.Vec3"},{"name":"distance","comment":" The distance between two vectors.\n","type":"AltMath.Vector3.Vec3 -> AltMath.Vector3.Vec3 -> Basics.Float"},{"name":"distanceSquared","comment":" The square of the distance between two vectors.\n","type":"AltMath.Vector3.Vec3 -> AltMath.Vector3.Vec3 -> Basics.Float"},{"name":"dot","comment":" The dot product of a and b\n","type":"AltMath.Vector3.Vec3 -> AltMath.Vector3.Vec3 -> Basics.Float"},{"name":"fromRecord","comment":" Convert a record to a vector.\n","type":"{ x : Basics.Float, y : Basics.Float, z : Basics.Float } -> AltMath.Vector3.Vec3"},{"name":"getX","comment":" Extract the x component of a vector.\n","type":"AltMath.Vector3.Vec3 -> Basics.Float"},{"name":"getY","comment":" Extract the y component of a vector.\n","type":"AltMath.Vector3.Vec3 -> Basics.Float"},{"name":"getZ","comment":" Extract the z component of a vector.\n","type":"AltMath.Vector3.Vec3 -> Basics.Float"},{"name":"i","comment":" The unit vector &icirc; which points in the x direction: `vec3 1 0 0`\n","type":"AltMath.Vector3.Vec3"},{"name":"j","comment":" The unit vector &jcirc; which points in the y direction: `vec3 0 1 0`\n","type":"AltMath.Vector3.Vec3"},{"name":"k","comment":" The unit vector k&#0770; which points in the z direction: `vec3 0 0 1`\n","type":"AltMath.Vector3.Vec3"},{"name":"length","comment":" The length of the given vector: |a|\n","type":"AltMath.Vector3.Vec3 -> Basics.Float"},{"name":"lengthSquared","comment":" The square of the length of the given vector: |a| \\* |a|\n","type":"AltMath.Vector3.Vec3 -> Basics.Float"},{"name":"negate","comment":" Vector negation: -a\n","type":"AltMath.Vector3.Vec3 -> AltMath.Vector3.Vec3"},{"name":"normalize","comment":" A unit vector with the same direction as the given vector: a / |a|\n","type":"AltMath.Vector3.Vec3 -> AltMath.Vector3.Vec3"},{"name":"scale","comment":" Multiply the vector by a scalar: s \\* v\n","type":"Basics.Float -> AltMath.Vector3.Vec3 -> AltMath.Vector3.Vec3"},{"name":"setX","comment":" Update the x component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Vector3.Vec3 -> AltMath.Vector3.Vec3"},{"name":"setY","comment":" Update the y component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Vector3.Vec3 -> AltMath.Vector3.Vec3"},{"name":"setZ","comment":" Update the z component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Vector3.Vec3 -> AltMath.Vector3.Vec3"},{"name":"sub","comment":" Vector subtraction: a - b\n","type":"AltMath.Vector3.Vec3 -> AltMath.Vector3.Vec3 -> AltMath.Vector3.Vec3"},{"name":"toRecord","comment":" Convert a vector to a record.\n","type":"AltMath.Vector3.Vec3 -> { x : Basics.Float, y : Basics.Float, z : Basics.Float }"},{"name":"vec3","comment":" Creates a new 3-element vector with the given values.\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Vector3.Vec3"}],"binops":[]},{"name":"AltMath.Vector4","comment":"\n\n\n# Create\n\n@docs Vec4, vec4\n\n\n# Get and Set\n\nThe set functions create a new copy of the vector, updating a single field.\n\n@docs getX, getY, getZ, getW, setX, setY, setZ, setW\n\n\n# Operations\n\n@docs add, sub, negate, scale, dot, normalize, direction\n@docs length, lengthSquared, distance, distanceSquared\n\n\n# Conversions\n\n@docs toRecord, fromRecord\n\n","unions":[],"aliases":[{"name":"Vec4","comment":" Four dimensional vector type\n","args":[],"type":"AltMath.Alternative.Record.Vector4.Vec4"}],"values":[{"name":"add","comment":" Vector addition: a + b\n","type":"AltMath.Vector4.Vec4 -> AltMath.Vector4.Vec4 -> AltMath.Vector4.Vec4"},{"name":"direction","comment":" The normalized direction from b to a: (a - b) / |a - b|\n","type":"AltMath.Vector4.Vec4 -> AltMath.Vector4.Vec4 -> AltMath.Vector4.Vec4"},{"name":"distance","comment":" The distance between two vectors.\n","type":"AltMath.Vector4.Vec4 -> AltMath.Vector4.Vec4 -> Basics.Float"},{"name":"distanceSquared","comment":" The square of the distance between two vectors.\n","type":"AltMath.Vector4.Vec4 -> AltMath.Vector4.Vec4 -> Basics.Float"},{"name":"dot","comment":" The dot product of a and b\n","type":"AltMath.Vector4.Vec4 -> AltMath.Vector4.Vec4 -> Basics.Float"},{"name":"fromRecord","comment":" Convert a record to a vector.\n","type":"{ x : Basics.Float, y : Basics.Float, z : Basics.Float, w : Basics.Float } -> AltMath.Vector4.Vec4"},{"name":"getW","comment":" Extract the w component of a vector.\n","type":"AltMath.Vector4.Vec4 -> Basics.Float"},{"name":"getX","comment":" Extract the x component of a vector.\n","type":"AltMath.Vector4.Vec4 -> Basics.Float"},{"name":"getY","comment":" Extract the y component of a vector.\n","type":"AltMath.Vector4.Vec4 -> Basics.Float"},{"name":"getZ","comment":" Extract the z component of a vector.\n","type":"AltMath.Vector4.Vec4 -> Basics.Float"},{"name":"length","comment":" The length of the given vector: |a|\n","type":"AltMath.Vector4.Vec4 -> Basics.Float"},{"name":"lengthSquared","comment":" The square of the length of the given vector: |a| \\* |a|\n","type":"AltMath.Vector4.Vec4 -> Basics.Float"},{"name":"negate","comment":" Vector negation: -a\n","type":"AltMath.Vector4.Vec4 -> AltMath.Vector4.Vec4"},{"name":"normalize","comment":" A unit vector with the same direction as the given vector: a / |a|\n","type":"AltMath.Vector4.Vec4 -> AltMath.Vector4.Vec4"},{"name":"scale","comment":" Multiply the vector by a scalar: s \\* v\n","type":"Basics.Float -> AltMath.Vector4.Vec4 -> AltMath.Vector4.Vec4"},{"name":"setW","comment":" Update the w component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Vector4.Vec4 -> AltMath.Vector4.Vec4"},{"name":"setX","comment":" Update the x component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Vector4.Vec4 -> AltMath.Vector4.Vec4"},{"name":"setY","comment":" Update the y component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Vector4.Vec4 -> AltMath.Vector4.Vec4"},{"name":"setZ","comment":" Update the z component of a vector, returning a new vector.\n","type":"Basics.Float -> AltMath.Vector4.Vec4 -> AltMath.Vector4.Vec4"},{"name":"sub","comment":" Vector subtraction: a - b\n","type":"AltMath.Vector4.Vec4 -> AltMath.Vector4.Vec4 -> AltMath.Vector4.Vec4"},{"name":"toRecord","comment":" Convert a vector to a record.\n","type":"AltMath.Vector4.Vec4 -> { x : Basics.Float, y : Basics.Float, z : Basics.Float, w : Basics.Float }"},{"name":"vec4","comment":" Creates a new 4-element vector with the given x, y, z, and w values.\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> AltMath.Vector4.Vec4"}],"binops":[]}]