js prototype error, please fix

js prototype error, please fix
0
#1

so

@example
js
var v = cc.v2(10, 10);
v.div(5); // return Vec2 {x: 2, y: 2};
var v1;
v.div(5, v1); // return Vec2 {x: 2, y: 2};
*/
div(divisor: Vec2, out?: Vec2): Vec2;

It says it wants a Vec2 however if you give it a Vec2 you will get a (Nan,Nan) back, the example shows it wants a number, which does work.

0 Likes