diff --git a/src/vmath.nim b/src/vmath.nim index 371d1d2..554f743 100644 --- a/src/vmath.nim +++ b/src/vmath.nim @@ -501,9 +501,9 @@ template genVecConstructor*(lower, upper, typ: untyped) = proc `lower 4`*[T](x: GVec4[T]): `upper 4` = gvec4[typ](typ(x[0]), typ(x[1]), typ(x[2]), typ(x[3])) - proc `lower 3`*[T](x: GVec2[T], z: T = 0): `upper 3` = + proc `lower 3`*[T](x: GVec2[T], z: T = 0.T): `upper 3` = gvec3[typ](typ(x[0]), typ(x[1]), z) - proc `lower 4`*[T](x: GVec3[T], w: T = 0): `upper 4` = + proc `lower 4`*[T](x: GVec3[T], w: T = 0.T): `upper 4` = gvec4[typ](typ(x[0]), typ(x[1]), typ(x[2]), w) proc `lower 4`*[T](a, b: GVec2[T]): `upper 4` =