How to use the @antv/gl-matrix/lib/gl-matrix/vec2.dot function in @antv/gl-matrix

To help you get started, we’ve selected a few @antv/gl-matrix examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github antvis / util / packages / matrix-util / src / vec2.ts View on Github external
vec2.angle = function (v1, v2) {
  const theta = vec2.dot(v1, v2) / (vec2.length(v1) * vec2.length(v2));
  return Math.acos(clamp(theta, -1, 1));
};

@antv/gl-matrix

Javascript Matrix and Vector library for High Performance WebGL apps

MIT
Latest version published 6 years ago

Package Health Score

62 / 100
Full package analysis

Similar packages