toji/gl-matrix

Some TypeScript declarations are wrong

ThisIsRex opened this issue · 1 comments

Some TS declarations don't match the documentation
изображение
изображение

Full list (maybe I skipped something):
quat2.length quat2.squaredLength quat2.setReal quat2.dot

I think that's an unfortunate consequence of how the Typescript declarations have been written. A dual quaternion's length is the same as the length of the real part (the first 4 elements)

export const squaredLength = quat.squaredLength;

And the length of a quaternion is the same as the length of a vector

export const squaredLength = vec4.squaredLength;

This is probably worth fixing