vec4() initialization wrong

.@Simeon There is a error with vec4() initialization. If a parameter isn’t supplied, the default should be 0. See the example below.


function setup()
    print( vec2() )
    print( vec3() )
    print( vec4() )
end

This results in:

(0.000000, 0.000000)

(0.000000, 0.000000, 0.000000)

(0.000000, 0.000000, 0.000000, 1.000000)

Hello @dave1707. This has been the default result for vec4() for some time. I believe it is explained by the fact that vec4 userdata is used to represent three-dimensional points with homogeneous coordinates. I’ve added some information to the wiki.

Thanks @mpilgrem. I wasn’t sure if it was supposed to be like that.