Construction builtinsGenerated
The builtins of kind construction, as the compiler’s own table lists them.
Methods
Section titled “Methods”| Returns | Function | Requires |
|---|---|---|
DMat2 |
dmat2 (c0: DVec2, c1: DVec2) +1 |
— |
DMat3 |
dmat3 (c0: DVec3, c1: DVec3, c2: DVec3) +1 |
— |
DMat4 |
dmat4 (c0: DVec4, c1: DVec4, c2: DVec4, c3: DVec4) +1 |
— |
DVec2 |
dvec2 (x: Double, y: Double) |
— |
DVec3 |
dvec3 (x: Double, y: Double, z: Double) +2 |
— |
DVec4 |
dvec4 (x: Double, y: Double, z: Double, w: Double) +2 |
— |
IVec2 |
ivec2 (x: Int, y: Int) |
— |
IVec3 |
ivec3 (x: Int, y: Int, z: Int) +2 |
— |
IVec4 |
ivec4 (x: Int, y: Int, z: Int, w: Int) +2 |
— |
LVec2 |
lvec2 (x: Long, y: Long) +1 |
— |
LVec3 |
lvec3 (x: Long, y: Long, z: Long) +2 |
— |
Mat2 |
mat2 (c0: Vec2, c1: Vec2) +1 |
— |
Mat3 |
mat3 (c0: Vec3, c1: Vec3, c2: Vec3) +1 |
— |
Mat4 |
mat4 (c0: Vec4, c1: Vec4, c2: Vec4, c3: Vec4) +1 |
— |
Vec2 |
vec2 (x: Float, y: Float) +1 |
— |
Vec3 |
vec3 (x: Float, y: Float, z: Float) +3 |
— |
Vec4 |
vec4 (x: Float, y: Float, z: Float, w: Float) +5 |
— |
Method descriptions
Section titled “Method descriptions”dmat2(c0: DVec2, c1: DVec2) -> DMat2dmat2(diagonal: Double) -> DMat2A matrix of doubles from its columns, or with one value down the diagonal; m[i] is a column, m * v applies it.
dmat3(c0: DVec3, c1: DVec3, c2: DVec3) -> DMat3dmat3(diagonal: Double) -> DMat3A matrix of doubles from its columns, or with one value down the diagonal; m[i] is a column, m * v applies it.
dmat4(c0: DVec4, c1: DVec4, c2: DVec4, c3: DVec4) -> DMat4dmat4(diagonal: Double) -> DMat4A matrix of doubles from its columns, or with one value down the diagonal; m[i] is a column, m * v applies it.
dvec2(x: Double, y: Double) -> DVec2A vector of doubles from components or shorter vectors, any number widened; a written number is taken exact, so dvec2(0.1, 0.2) holds the doubles nearest a tenth and a fifth.
dvec3(x: Double, y: Double, z: Double) -> DVec3dvec3(xy: DVec2, z: Double) -> DVec3dvec3(v: Vec3) -> DVec3A vector of doubles from components or shorter vectors, any number widened; a written number is taken exact.
dvec4(x: Double, y: Double, z: Double, w: Double) -> DVec4dvec4(xyz: DVec3, w: Double) -> DVec4dvec4(v: Vec4) -> DVec4A vector of doubles from components or shorter vectors, any number widened; a written number is taken exact.
ivec2(x: Int, y: Int) -> IVec2An integer vector from components: a cell, an offset; at and put take one as an address; v.yx and the like are swizzles.
ivec3(x: Int, y: Int, z: Int) -> IVec3ivec3(xy: IVec2, z: Int) -> IVec3ivec3(x: Int, yz: IVec2) -> IVec3An integer vector from components or a shorter integer vector: a cell, an offset; at and put take one as an address.
ivec4(x: Int, y: Int, z: Int, w: Int) -> IVec4ivec4(xyz: IVec3, w: Int) -> IVec4ivec4(xy: IVec2, zw: IVec2) -> IVec4An integer vector from components or shorter integer vectors, in order; v.wzyx and the like are swizzles.
lvec2(x: Long, y: Long) -> LVec2lvec2(v: IVec2) -> LVec2A vector of longs from components or shorter integer vectors, an Int widened.
lvec3(x: Long, y: Long, z: Long) -> LVec3lvec3(xy: LVec2, z: Long) -> LVec3lvec3(v: IVec3) -> LVec3A vector of longs from components or shorter integer vectors, an Int widened.
mat2(c0: Vec2, c1: Vec2) -> Mat2mat2(diagonal: Float) -> Mat2A matrix from its columns, or with one value down the diagonal and zeros elsewhere; m[i] is a column, m * v applies it.
mat3(c0: Vec3, c1: Vec3, c2: Vec3) -> Mat3mat3(diagonal: Float) -> Mat3A matrix from its columns, or with one value down the diagonal and zeros elsewhere; m[i] is a column, m * v applies it.
mat4(c0: Vec4, c1: Vec4, c2: Vec4, c3: Vec4) -> Mat4mat4(diagonal: Float) -> Mat4A matrix from its columns, or with one value down the diagonal and zeros elsewhere; m[i] is a column, m * v applies it.
vec2(x: Float, y: Float) -> Vec2vec2(x: Int, y: Int) -> Vec2A vector from components, Float or Int (widened), in order; v.xy, v.yx and the like are swizzles.
vec3(x: Float, y: Float, z: Float) -> Vec3vec3(x: Int, y: Int, z: Int) -> Vec3vec3(xy: Vec2, z: Float) -> Vec3vec3(x: Float, yz: Vec2) -> Vec3A vector from components, Float, Int (widened) or shorter vectors, in order; v.xyz, v.zyx and the like are swizzles.
vec4(x: Float, y: Float, z: Float, w: Float) -> Vec4vec4(x: Int, y: Int, z: Int, w: Int) -> Vec4vec4(xyz: Vec3, w: Float) -> Vec4vec4(xy: Vec2, zw: Vec2) -> Vec4vec4(xy: Vec2, z: Float, w: Float) -> Vec4vec4(x: Float, yzw: Vec3) -> Vec4A vector from components, Float, Int (widened) or shorter vectors, in order; v.xyz, v.wzyx, c.rgb and the like are swizzles.

