Math builtinsGenerated
The builtins of kind math, as the compiler’s own table lists them.
Methods
Section titled “Methods”| Returns | Function | Requires |
|---|---|---|
Float |
abs (x: Float) +14 |
— |
Float |
acos (x: Float) +7 |
— |
Int |
add_wrap (a: Int, b: Int) +1 |
— |
Float |
asin (x: Float) +7 |
— |
Float |
atan (x: Float) +7 |
— |
Float |
atan2 (y: Float, x: Float) +1 |
— |
Int |
bits (x: Float) |
— |
Float |
ceil (x: Float) +7 |
— |
Float |
clamp (x: Float, low: Float, high: Float) +25 |
— |
Int |
clz (x: Int) |
— |
Float |
cos (x: Float) +7 |
— |
Float |
cosh (x: Float) +7 |
— |
Vec3 |
cross (a: Vec3, b: Vec3) +1 |
— |
Int |
ctz (x: Int) |
— |
Float |
degrees (x: Float) +3 |
— |
Float |
determinant (m: Mat2) +3 |
— |
Float |
distance (a: Vec2, b: Vec2) +2 |
— |
Float |
dot (a: Vec2, b: Vec2) +3 |
— |
Float |
exp (x: Float) +7 |
— |
Float |
exp2 (x: Float) +7 |
— |
Float |
floor (x: Float) +7 |
— |
Float |
fma (a: Float, b: Float, c: Float) +7 |
— |
Float |
fract (x: Float) +7 |
— |
Float |
from_bits (x: Int) |
— |
Mat2 |
inverse (m: Mat2) +3 |
— |
Float |
inversesqrt (x: Float) +3 |
— |
Bool |
isinf (x: Float) |
— |
Bool |
isnan (x: Float) |
— |
Float |
length (v: Vec2) +3 |
— |
Float |
log (x: Float) +7 |
— |
Float |
log2 (x: Float) +7 |
— |
Float |
max (a: Float, b: Float) +25 |
— |
Float |
min (a: Float, b: Float) +25 |
— |
Float |
mix (a: Float, b: Float, t: Float) +13 |
— |
Float |
mod (x: Float, y: Float) +6 |
— |
Int |
mul_wrap (a: Int, b: Int) +1 |
— |
Int |
mulhi (a: Int, b: Int) |
— |
Vec2 |
normalize (v: Vec2) +3 |
— |
Int |
popcount (x: Int) |
— |
Float |
pow (base: Float, exponent: Float) +13 |
— |
Float |
radians (x: Float) +3 |
— |
Vec3 |
reflect (incident: Vec3, normal: Vec3) +2 |
— |
Vec2 |
refract (incident: Vec2, normal: Vec2, eta: Float) +2 |
— |
Int |
rotl (x: Int, n: Int) |
— |
Int |
rotr (x: Int, n: Int) |
— |
Float |
round (x: Float) +7 |
— |
Float |
saturate (x: Float) +3 |
— |
Float |
sign (x: Float) +14 |
— |
Float |
sin (x: Float) +7 |
— |
Float |
sinh (x: Float) +7 |
— |
Float |
smoothstep (low: Float, high: Float, x: Float) +13 |
— |
Float |
sqrt (x: Float) +7 |
— |
Float |
step (edge: Float, x: Float) +13 |
— |
Int |
sub_wrap (a: Int, b: Int) +1 |
— |
Float |
tan (x: Float) +7 |
— |
Float |
tanh (x: Float) +7 |
— |
Mat2 |
transpose (m: Mat2) +3 |
— |
Float |
trunc (x: Float) +7 |
— |
Int |
udiv (a: Int, b: Int) |
— |
Bool |
ult (a: Int, b: Int) |
— |
Int |
umulhi (a: Int, b: Int) |
— |
Int |
urem (a: Int, b: Int) |
— |
Method descriptions
Section titled “Method descriptions”abs(x: Float) -> Floatabs(x: Int) -> Intabs(x: Vec2) -> Vec2abs(x: Vec3) -> Vec3abs(x: Vec4) -> Vec4abs(x: IVec2) -> IVec2abs(x: IVec3) -> IVec3abs(x: IVec4) -> IVec4abs(x: Double) -> Doubleabs(x: Long) -> Longabs(x: DVec2) -> DVec2abs(x: DVec3) -> DVec3abs(x: DVec4) -> DVec4abs(x: LVec2) -> LVec2abs(x: LVec3) -> LVec3The absolute value, componentwise; an Int or IVec stays one.
acos(x: Float) -> Floatacos(x: Vec2) -> Vec2acos(x: Vec3) -> Vec3acos(x: Vec4) -> Vec4acos(x: Double) -> Doubleacos(x: DVec2) -> DVec2acos(x: DVec3) -> DVec3acos(x: DVec4) -> DVec4The arc cosine, componentwise.
add_wrap
Section titled “add_wrap”add_wrap(a: Int, b: Int) -> Intadd_wrap(a: Long, b: Long) -> Longa + b modulo 2^32 on Ints: never a failure, unlike +.
asin(x: Float) -> Floatasin(x: Vec2) -> Vec2asin(x: Vec3) -> Vec3asin(x: Vec4) -> Vec4asin(x: Double) -> Doubleasin(x: DVec2) -> DVec2asin(x: DVec3) -> DVec3asin(x: DVec4) -> DVec4The arc sine, componentwise.
atan(x: Float) -> Floatatan(x: Vec2) -> Vec2atan(x: Vec3) -> Vec3atan(x: Vec4) -> Vec4atan(x: Double) -> Doubleatan(x: DVec2) -> DVec2atan(x: DVec3) -> DVec3atan(x: DVec4) -> DVec4The arc tangent of one value, componentwise; atan2 takes two.
atan2(y: Float, x: Float) -> Floatatan2(y: Double, x: Double) -> DoubleThe angle of the point (x, y) from the x axis, in -pi..pi.
bits(x: Float) -> Intx’s 32 bits as an Int, unchanged: for a Float of no sign, the Ints order as the Floats do.
ceil(x: Float) -> Floatceil(x: Vec2) -> Vec2ceil(x: Vec3) -> Vec3ceil(x: Vec4) -> Vec4ceil(x: Double) -> Doubleceil(x: DVec2) -> DVec2ceil(x: DVec3) -> DVec3ceil(x: DVec4) -> DVec4The smallest integer not less than x, componentwise.
clamp(x: Float, low: Float, high: Float) -> Floatclamp(x: Int, low: Int, high: Int) -> Intclamp(x: Vec2, low: Float, high: Float) -> Vec2clamp(x: Vec2, low: Vec2, high: Vec2) -> Vec2clamp(x: Vec3, low: Float, high: Float) -> Vec3clamp(x: Vec3, low: Vec3, high: Vec3) -> Vec3clamp(x: Vec4, low: Float, high: Float) -> Vec4clamp(x: Vec4, low: Vec4, high: Vec4) -> Vec4clamp(x: IVec2, low: Int, high: Int) -> IVec2clamp(x: IVec2, low: IVec2, high: IVec2) -> IVec2clamp(x: IVec3, low: Int, high: Int) -> IVec3clamp(x: IVec3, low: IVec3, high: IVec3) -> IVec3clamp(x: IVec4, low: Int, high: Int) -> IVec4clamp(x: IVec4, low: IVec4, high: IVec4) -> IVec4clamp(x: Double, low: Double, high: Double) -> Doubleclamp(x: Long, low: Long, high: Long) -> Longclamp(x: DVec2, low: Double, high: Double) -> DVec2clamp(x: DVec2, low: DVec2, high: DVec2) -> DVec2clamp(x: DVec3, low: Double, high: Double) -> DVec3clamp(x: DVec3, low: DVec3, high: DVec3) -> DVec3clamp(x: DVec4, low: Double, high: Double) -> DVec4clamp(x: DVec4, low: DVec4, high: DVec4) -> DVec4clamp(x: LVec2, low: Long, high: Long) -> LVec2clamp(x: LVec2, low: LVec2, high: LVec2) -> LVec2clamp(x: LVec3, low: Long, high: Long) -> LVec3clamp(x: LVec3, low: LVec3, high: LVec3) -> LVec3x held between low and high, componentwise; Float bounds broadcast.
clz(x: Int) -> IntHow many zero bits lead x; 32 for zero.
cos(x: Float) -> Floatcos(x: Vec2) -> Vec2cos(x: Vec3) -> Vec3cos(x: Vec4) -> Vec4cos(x: Double) -> Doublecos(x: DVec2) -> DVec2cos(x: DVec3) -> DVec3cos(x: DVec4) -> DVec4The cosine, componentwise.
cosh(x: Float) -> Floatcosh(x: Vec2) -> Vec2cosh(x: Vec3) -> Vec3cosh(x: Vec4) -> Vec4cosh(x: Double) -> Doublecosh(x: DVec2) -> DVec2cosh(x: DVec3) -> DVec3cosh(x: DVec4) -> DVec4The hyperbolic cosine, componentwise.
cross(a: Vec3, b: Vec3) -> Vec3cross(a: DVec3, b: DVec3) -> DVec3The cross product of two three-component vectors.
ctz(x: Int) -> IntHow many zero bits trail x; 32 for zero.
degrees
Section titled “degrees”degrees(x: Float) -> Floatdegrees(x: Vec2) -> Vec2degrees(x: Vec3) -> Vec3degrees(x: Vec4) -> Vec4Radians to degrees, componentwise.
determinant
Section titled “determinant”determinant(m: Mat2) -> Floatdeterminant(m: Mat3) -> Floatdeterminant(m: Mat4) -> Floatdeterminant(m: DMat4) -> DoubleThe determinant of a square matrix, expanded along the first row.
distance
Section titled “distance”distance(a: Vec2, b: Vec2) -> Floatdistance(a: Vec3, b: Vec3) -> Floatdistance(a: Vec4, b: Vec4) -> FloatThe length of a - b.
dot(a: Vec2, b: Vec2) -> Floatdot(a: Vec3, b: Vec3) -> Floatdot(a: Vec4, b: Vec4) -> Floatdot(a: DVec3, b: DVec3) -> DoubleThe dot product of two vectors of one size: the componentwise product, summed first to last.
exp(x: Float) -> Floatexp(x: Vec2) -> Vec2exp(x: Vec3) -> Vec3exp(x: Vec4) -> Vec4exp(x: Double) -> Doubleexp(x: DVec2) -> DVec2exp(x: DVec3) -> DVec3exp(x: DVec4) -> DVec4e raised to x, componentwise.
exp2(x: Float) -> Floatexp2(x: Vec2) -> Vec2exp2(x: Vec3) -> Vec3exp2(x: Vec4) -> Vec4exp2(x: Double) -> Doubleexp2(x: DVec2) -> DVec2exp2(x: DVec3) -> DVec3exp2(x: DVec4) -> DVec42 raised to x, componentwise.
floor(x: Float) -> Floatfloor(x: Vec2) -> Vec2floor(x: Vec3) -> Vec3floor(x: Vec4) -> Vec4floor(x: Double) -> Doublefloor(x: DVec2) -> DVec2floor(x: DVec3) -> DVec3floor(x: DVec4) -> DVec4The largest integer not greater than x, componentwise.
fma(a: Float, b: Float, c: Float) -> Floatfma(a: Vec2, b: Vec2, c: Vec2) -> Vec2fma(a: Vec3, b: Vec3, c: Vec3) -> Vec3fma(a: Vec4, b: Vec4, c: Vec4) -> Vec4fma(a: Double, b: Double, c: Double) -> Doublefma(a: DVec2, b: DVec2, c: DVec2) -> DVec2fma(a: DVec3, b: DVec3, c: DVec3) -> DVec3fma(a: DVec4, b: DVec4, c: DVec4) -> DVec4a * b + c rounded once, componentwise.
fract(x: Float) -> Floatfract(x: Vec2) -> Vec2fract(x: Vec3) -> Vec3fract(x: Vec4) -> Vec4fract(x: Double) -> Doublefract(x: DVec2) -> DVec2fract(x: DVec3) -> DVec3fract(x: DVec4) -> DVec4The fractional part, x - floor(x), componentwise.
from_bits
Section titled “from_bits”from_bits(x: Int) -> Floatx’s 32 bits as a Float, unchanged; bits(from_bits(x)) is x.
inverse
Section titled “inverse”inverse(m: Mat2) -> Mat2inverse(m: Mat3) -> Mat3inverse(m: Mat4) -> Mat4inverse(m: DMat4) -> DMat4The matrix that multiplies m to the identity: its adjugate over its determinant; a singular m gives no finite numbers.
inversesqrt
Section titled “inversesqrt”inversesqrt(x: Float) -> Floatinversesqrt(x: Vec2) -> Vec2inversesqrt(x: Vec3) -> Vec3inversesqrt(x: Vec4) -> Vec41 / sqrt(x), componentwise.
isinf(x: Float) -> BoolWhether x is infinite.
isnan(x: Float) -> BoolWhether x is not a number.
length
Section titled “length”length(v: Vec2) -> Floatlength(v: Vec3) -> Floatlength(v: Vec4) -> Floatlength(v: DVec3) -> DoubleThe Euclidean length of a vector: sqrt(dot(v, v)).
log(x: Float) -> Floatlog(x: Vec2) -> Vec2log(x: Vec3) -> Vec3log(x: Vec4) -> Vec4log(x: Double) -> Doublelog(x: DVec2) -> DVec2log(x: DVec3) -> DVec3log(x: DVec4) -> DVec4The natural logarithm, componentwise.
log2(x: Float) -> Floatlog2(x: Vec2) -> Vec2log2(x: Vec3) -> Vec3log2(x: Vec4) -> Vec4log2(x: Double) -> Doublelog2(x: DVec2) -> DVec2log2(x: DVec3) -> DVec3log2(x: DVec4) -> DVec4The base-2 logarithm, componentwise.
max(a: Float, b: Float) -> Floatmax(a: Int, b: Int) -> Intmax(a: Vec2, b: Float) -> Vec2max(a: Vec2, b: Vec2) -> Vec2max(a: Vec3, b: Float) -> Vec3max(a: Vec3, b: Vec3) -> Vec3max(a: Vec4, b: Float) -> Vec4max(a: Vec4, b: Vec4) -> Vec4max(a: IVec2, b: Int) -> IVec2max(a: IVec2, b: IVec2) -> IVec2max(a: IVec3, b: Int) -> IVec3max(a: IVec3, b: IVec3) -> IVec3max(a: IVec4, b: Int) -> IVec4max(a: IVec4, b: IVec4) -> IVec4max(a: Double, b: Double) -> Doublemax(a: Long, b: Long) -> Longmax(a: DVec2, b: Double) -> DVec2max(a: DVec2, b: DVec2) -> DVec2max(a: DVec3, b: Double) -> DVec3max(a: DVec3, b: DVec3) -> DVec3max(a: DVec4, b: Double) -> DVec4max(a: DVec4, b: DVec4) -> DVec4max(a: LVec2, b: Long) -> LVec2max(a: LVec2, b: LVec2) -> LVec2max(a: LVec3, b: Long) -> LVec3max(a: LVec3, b: LVec3) -> LVec3The larger of a and b, componentwise; a Float beside a vector broadcasts.
min(a: Float, b: Float) -> Floatmin(a: Int, b: Int) -> Intmin(a: Vec2, b: Float) -> Vec2min(a: Vec2, b: Vec2) -> Vec2min(a: Vec3, b: Float) -> Vec3min(a: Vec3, b: Vec3) -> Vec3min(a: Vec4, b: Float) -> Vec4min(a: Vec4, b: Vec4) -> Vec4min(a: IVec2, b: Int) -> IVec2min(a: IVec2, b: IVec2) -> IVec2min(a: IVec3, b: Int) -> IVec3min(a: IVec3, b: IVec3) -> IVec3min(a: IVec4, b: Int) -> IVec4min(a: IVec4, b: IVec4) -> IVec4min(a: Double, b: Double) -> Doublemin(a: Long, b: Long) -> Longmin(a: DVec2, b: Double) -> DVec2min(a: DVec2, b: DVec2) -> DVec2min(a: DVec3, b: Double) -> DVec3min(a: DVec3, b: DVec3) -> DVec3min(a: DVec4, b: Double) -> DVec4min(a: DVec4, b: DVec4) -> DVec4min(a: LVec2, b: Long) -> LVec2min(a: LVec2, b: LVec2) -> LVec2min(a: LVec3, b: Long) -> LVec3min(a: LVec3, b: LVec3) -> LVec3The smaller of a and b, componentwise; a Float beside a vector broadcasts.
mix(a: Float, b: Float, t: Float) -> Floatmix(a: Vec2, b: Vec2, t: Float) -> Vec2mix(a: Vec2, b: Vec2, t: Vec2) -> Vec2mix(a: Vec3, b: Vec3, t: Float) -> Vec3mix(a: Vec3, b: Vec3, t: Vec3) -> Vec3mix(a: Vec4, b: Vec4, t: Float) -> Vec4mix(a: Vec4, b: Vec4, t: Vec4) -> Vec4mix(a: Double, b: Double, t: Double) -> Doublemix(a: DVec2, b: DVec2, t: Double) -> DVec2mix(a: DVec2, b: DVec2, t: DVec2) -> DVec2mix(a: DVec3, b: DVec3, t: Double) -> DVec3mix(a: DVec3, b: DVec3, t: DVec3) -> DVec3mix(a: DVec4, b: DVec4, t: Double) -> DVec4mix(a: DVec4, b: DVec4, t: DVec4) -> DVec4a + (b - a) * t, componentwise; t a Float or componentwise.
mod(x: Float, y: Float) -> Floatmod(x: Vec2, y: Vec2) -> Vec2mod(x: Vec2, y: Float) -> Vec2mod(x: Vec3, y: Vec3) -> Vec3mod(x: Vec3, y: Float) -> Vec3mod(x: Vec4, y: Vec4) -> Vec4mod(x: Vec4, y: Float) -> Vec4x - y * floor(x / y): the remainder with y’s sign, for wrapping coordinates, where % truncates toward zero.
mul_wrap
Section titled “mul_wrap”mul_wrap(a: Int, b: Int) -> Intmul_wrap(a: Long, b: Long) -> LongThe low 32 bits of a * b on Ints: never a failure, unlike *.
mulhi(a: Int, b: Int) -> IntThe high 32 bits of the signed 64-bit product of a and b.
normalize
Section titled “normalize”normalize(v: Vec2) -> Vec2normalize(v: Vec3) -> Vec3normalize(v: Vec4) -> Vec4normalize(v: DVec3) -> DVec3The unit vector in v’s direction; the zero vector stays zero.
popcount
Section titled “popcount”popcount(x: Int) -> IntHow many bits of x are one.
pow(base: Float, exponent: Float) -> Floatpow(base: Vec2, exponent: Float) -> Vec2pow(base: Vec2, exponent: Vec2) -> Vec2pow(base: Vec3, exponent: Float) -> Vec3pow(base: Vec3, exponent: Vec3) -> Vec3pow(base: Vec4, exponent: Float) -> Vec4pow(base: Vec4, exponent: Vec4) -> Vec4pow(base: Double, exponent: Double) -> Doublepow(base: DVec2, exponent: Double) -> DVec2pow(base: DVec2, exponent: DVec2) -> DVec2pow(base: DVec3, exponent: Double) -> DVec3pow(base: DVec3, exponent: DVec3) -> DVec3pow(base: DVec4, exponent: Double) -> DVec4pow(base: DVec4, exponent: DVec4) -> DVec4base raised to exponent, componentwise; a Float exponent broadcasts.
radians
Section titled “radians”radians(x: Float) -> Floatradians(x: Vec2) -> Vec2radians(x: Vec3) -> Vec3radians(x: Vec4) -> Vec4Degrees to radians, componentwise.
reflect
Section titled “reflect”reflect(incident: Vec3, normal: Vec3) -> Vec3reflect(incident: Vec2, normal: Vec2) -> Vec2reflect(incident: DVec3, normal: DVec3) -> DVec3incident reflected off the surface with unit normal normal: incident - 2 * dot(normal, incident) * normal.
refract
Section titled “refract”refract(incident: Vec2, normal: Vec2, eta: Float) -> Vec2refract(incident: Vec3, normal: Vec3, eta: Float) -> Vec3refract(incident: Vec4, normal: Vec4, eta: Float) -> Vec4incident bent through a surface with unit normal normal by the ratio of indices eta; the zero vector past total internal reflection.
rotl(x: Int, n: Int) -> Intx’s bits rotated left by n modulo 32.
rotr(x: Int, n: Int) -> Intx’s bits rotated right by n modulo 32.
round(x: Float) -> Floatround(x: Vec2) -> Vec2round(x: Vec3) -> Vec3round(x: Vec4) -> Vec4round(x: Double) -> Doubleround(x: DVec2) -> DVec2round(x: DVec3) -> DVec3round(x: DVec4) -> DVec4The nearest integer, ties to even, componentwise.
saturate
Section titled “saturate”saturate(x: Float) -> Floatsaturate(x: Vec2) -> Vec2saturate(x: Vec3) -> Vec3saturate(x: Vec4) -> Vec4x held between 0 and 1, componentwise: clamp(x, 0.0, 1.0).
sign(x: Float) -> Floatsign(x: Int) -> Intsign(x: Vec2) -> Vec2sign(x: Vec3) -> Vec3sign(x: Vec4) -> Vec4sign(x: IVec2) -> IVec2sign(x: IVec3) -> IVec3sign(x: IVec4) -> IVec4sign(x: Double) -> Doublesign(x: Long) -> Longsign(x: DVec2) -> DVec2sign(x: DVec3) -> DVec3sign(x: DVec4) -> DVec4sign(x: LVec2) -> LVec2sign(x: LVec3) -> LVec3-1, 0 or 1 by the sign of x, componentwise; an Int stays an Int.
sin(x: Float) -> Floatsin(x: Vec2) -> Vec2sin(x: Vec3) -> Vec3sin(x: Vec4) -> Vec4sin(x: Double) -> Doublesin(x: DVec2) -> DVec2sin(x: DVec3) -> DVec3sin(x: DVec4) -> DVec4The sine, componentwise.
sinh(x: Float) -> Floatsinh(x: Vec2) -> Vec2sinh(x: Vec3) -> Vec3sinh(x: Vec4) -> Vec4sinh(x: Double) -> Doublesinh(x: DVec2) -> DVec2sinh(x: DVec3) -> DVec3sinh(x: DVec4) -> DVec4The hyperbolic sine, componentwise.
smoothstep
Section titled “smoothstep”smoothstep(low: Float, high: Float, x: Float) -> Floatsmoothstep(low: Float, high: Float, x: Vec2) -> Vec2smoothstep(low: Float, high: Float, x: Vec3) -> Vec3smoothstep(low: Float, high: Float, x: Vec4) -> Vec4smoothstep(low: Vec2, high: Vec2, x: Vec2) -> Vec2smoothstep(low: Vec3, high: Vec3, x: Vec3) -> Vec3smoothstep(low: Vec4, high: Vec4, x: Vec4) -> Vec4smoothstep(low: Double, high: Double, x: Double) -> Doublesmoothstep(low: Double, high: Double, x: DVec2) -> DVec2smoothstep(low: Double, high: Double, x: DVec3) -> DVec3smoothstep(low: Double, high: Double, x: DVec4) -> DVec4smoothstep(low: DVec2, high: DVec2, x: DVec2) -> DVec2smoothstep(low: DVec3, high: DVec3, x: DVec3) -> DVec3smoothstep(low: DVec4, high: DVec4, x: DVec4) -> DVec40 below low, 1 above high, a smooth curve between, componentwise; Float edges broadcast.
sqrt(x: Float) -> Floatsqrt(x: Vec2) -> Vec2sqrt(x: Vec3) -> Vec3sqrt(x: Vec4) -> Vec4sqrt(x: Double) -> Doublesqrt(x: DVec2) -> DVec2sqrt(x: DVec3) -> DVec3sqrt(x: DVec4) -> DVec4The square root, componentwise.
step(edge: Float, x: Float) -> Floatstep(edge: Float, x: Vec2) -> Vec2step(edge: Float, x: Vec3) -> Vec3step(edge: Float, x: Vec4) -> Vec4step(edge: Vec2, x: Vec2) -> Vec2step(edge: Vec3, x: Vec3) -> Vec3step(edge: Vec4, x: Vec4) -> Vec4step(edge: Double, x: Double) -> Doublestep(edge: Double, x: DVec2) -> DVec2step(edge: Double, x: DVec3) -> DVec3step(edge: Double, x: DVec4) -> DVec4step(edge: DVec2, x: DVec2) -> DVec2step(edge: DVec3, x: DVec3) -> DVec3step(edge: DVec4, x: DVec4) -> DVec41 where x >= edge, else 0, componentwise; a Float edge broadcasts.
sub_wrap
Section titled “sub_wrap”sub_wrap(a: Int, b: Int) -> Intsub_wrap(a: Long, b: Long) -> Longa - b modulo 2^32 on Ints: never a failure, unlike -.
tan(x: Float) -> Floattan(x: Vec2) -> Vec2tan(x: Vec3) -> Vec3tan(x: Vec4) -> Vec4tan(x: Double) -> Doubletan(x: DVec2) -> DVec2tan(x: DVec3) -> DVec3tan(x: DVec4) -> DVec4The tangent, componentwise.
tanh(x: Float) -> Floattanh(x: Vec2) -> Vec2tanh(x: Vec3) -> Vec3tanh(x: Vec4) -> Vec4tanh(x: Double) -> Doubletanh(x: DVec2) -> DVec2tanh(x: DVec3) -> DVec3tanh(x: DVec4) -> DVec4The hyperbolic tangent, componentwise.
transpose
Section titled “transpose”transpose(m: Mat2) -> Mat2transpose(m: Mat3) -> Mat3transpose(m: Mat4) -> Mat4transpose(m: DMat4) -> DMat4The matrix with its rows and columns exchanged.
trunc(x: Float) -> Floattrunc(x: Vec2) -> Vec2trunc(x: Vec3) -> Vec3trunc(x: Vec4) -> Vec4trunc(x: Double) -> Doubletrunc(x: DVec2) -> DVec2trunc(x: DVec3) -> DVec3trunc(x: DVec4) -> DVec4The integer part of x, toward zero, componentwise.
udiv(a: Int, b: Int) -> IntThe quotient of a and b as unsigned 32-bit values; a zero b is a failure, like /.
ult(a: Int, b: Int) -> BoolWhether a is below b as unsigned 32-bit values.
umulhi
Section titled “umulhi”umulhi(a: Int, b: Int) -> IntThe high 32 bits of the unsigned 64-bit product of a and b.
urem(a: Int, b: Int) -> IntThe remainder of a and b as unsigned 32-bit values; a zero b is a failure, like %.

