Here is what I want:
vec3(1,2,3)
Creates a vector with:
x=1.0
y=2.0
z=3.0
vec3(4.0)
Creates a vector with:
x=4.0
y=4.0
z=4.0
Is there any way this can be done?:
Function Vec3:TVec3(x#=0.0,y#=Nan,z#=Nan)
Local t:TVec2=New TVec2
If IsNan(y) y=x
If IsNan(z) z=y
t.x=x
t.y=y
t.z=z
Return t
EndFunction
vec3(1,2,3)
Creates a vector with:
x=1.0
y=2.0
z=3.0
vec3(4.0)
Creates a vector with:
x=4.0
y=4.0
z=4.0
Is there any way this can be done?:
Function Vec3:TVec3(x#=0.0,y#=Nan,z#=Nan)
Local t:TVec2=New TVec2
If IsNan(y) y=x
If IsNan(z) z=y
t.x=x
t.y=y
t.z=z
Return t
EndFunction