on methods like set() the second param is optional. If the second param is optional it will set the second prop as the value for the first param.
That sounds fine on paper but the problem is with values such as 0.
say if the second param is 0 then it will be ignored and the second prop (here it's y) will be set as the first param
eg:
const a = vec2()
a.set(1, 2) // it works because the value is non-zero. so a.x = 1 & a.y = 2
a.set(1, 0) // here, a.x = 1 & a.y = 1
// expected a.x = 1 and a.y = 0 but it isn't the case here
I think this issue is also with other methods using || operator
on methods like
set()the second param is optional. If the second param is optional it will set the second prop as the value for the first param.That sounds fine on paper but the problem is with values such as
0.say if the second param is
0then it will be ignored and the second prop (here it'sy) will be set as the first parameg:
I think this issue is also with other methods using
||operator