pub enum TowerOp {
Show 13 variants
MakeVec2,
MakeVec3,
MakeVec4,
MakeQuat,
MakeMat2,
MakeMat3,
MakeMat4,
Dot,
Cross,
Min,
Max,
Clamp,
Lerp,
}Expand description
The tower operation selected by an Opcode::Tower instruction’s kind
byte (NS-A8, docs/tower-mini-spec.md; docs/stdlib-spec.md §2b).
Constructors pop their lanes/columns and push the built value; verbs pop
their operands and push the result. All semantics are glam’s (T3:
conventions per glam, wholesale); all operations are pure. The
+/-/* operator family does NOT live here — it rides the existing
Add/Subtract/Multiply/Negate opcodes via value_ops::binary_op’s
tower arms.
Variants§
MakeVec2
[x, y] → vec2. Numeric lanes (ints promote to f32).
MakeVec3
[x, y, z] → vec3.
MakeVec4
[x, y, z, w] → vec4.
MakeQuat
[x, y, z, w] → quat — raw lanes, glam Quat::from_xyzw.
MakeMat2
[col0, col1] → mat2 from vec2 columns (column-major, T3).
MakeMat3
[col0, col1, col2] → mat3 from vec3 columns.
MakeMat4
[col0, col1, col2, col3] → mat4 from vec4 columns.
Dot
[a, b] → float — dot product of two same-size vectors.
Cross
[a, b] → vec3 — cross product, vec3 only.
Min
[a, b] → componentwise minimum of two same-kind vectors.
Max
[a, b] → componentwise maximum of two same-kind vectors.
Clamp
[x, lo, hi] → componentwise clamp of three same-kind vectors.
Lerp
[a, b, t] → linear interpolation with scalar t: vectors
componentwise, quats via glam’s normalizing Quat::lerp.