Awesome! I will look to make a PR for those.
Yes that sounds good, much better than loop, why couldn’t I think of that haha!
Yes multiple entries, at the moment this is what happens:
function normalize(v1: vector3|vector4|quaternion): vector3|vector4|quaternion
local n = normalize(vmath.vector3(1.0))
-- typeof n = vector3|vector4|quaternion
Whereas it works nicer if there is multiple entries
function normalize(v1: vector3): vector3
function normalize(v1: vector4): vector4
function normalize(v1: quaternion): quaternion
local n = normalize(vmath.vector3(1.0))
-- typeof n = vector3
It could be solved with an update to Teal - some languages/compilers split types and variables into separate namespaces internally so they can be named the same and don’t clash. On second thought it’s probably long shot for Teal to solve that, and it’s probably better to consider renaming the result type to avoid any potential clashes.