vec3
3d vector math with good unit tests
Last updated 14 years ago by superjoe .
BSD · Original npm · Tarball · package.json
$ npm install vec3 
SYNC missed versions from official npm registry.

vec3

3D vector math with robust unit tests.

Usage

var v = require('vec3');

var v1 = v(1, 2, 3);
console.log(v1); // prints "(1, 2, 3)"
var v2 = v1.offset(0, 0, 1);
console.log(v2); // prints "(1, 2, 4)"

Or:

var Vec3 = require('vec3').Vec3;

var v1 = new Vec3(1, 2, 3);
// etc...

More available functions are listed below in Test Coverage.

Test Coverage

  v()
    ✓ x, y, z 
    ✓ array 
    ✓ object 

  vec3
    ✓ floored 
    ✓ offset 
    ✓ plus 
    ✓ minus 
    ✓ scaled 
    ✓ abs 
    ✓ distanceTo 
    ✓ equals 
    ✓ toString 
    ✓ clone 


  13 tests complete (3 ms)

Current Tags

  • 0.2.0                                ...           latest (8 months ago)

20 Versions

  • 0.2.0                                ...           8 months ago
  • 0.1.10                                ...           3 years ago
  • 0.1.9                                ...           3 years ago
  • 0.1.8                                ...           4 years ago
  • 0.1.7                                ...           6 years ago
  • 0.1.6                                ...           6 years ago
  • 0.1.5                                ...           6 years ago
  • 0.1.4                                ...           7 years ago
  • 0.1.3                                ...           14 years ago
  • 0.1.2                                ...           14 years ago
  • 0.1.1                                ...           14 years ago
  • 0.1.0                                ...           14 years ago
  • 0.0.8                                ...           14 years ago
  • 0.0.7                                ...           14 years ago
  • 0.0.6                                ...           14 years ago
  • 0.0.5                                ...           14 years ago
  • 0.0.4                                ...           14 years ago
  • 0.0.3                                ...           14 years ago
  • 0.0.2                                ...           14 years ago
  • 0.0.1                                ...           14 years ago
Maintainers (1)
Downloads
Total 98
Today 0
This Week 0
This Month 25
Last Day 0
Last Week 1
Last Month 42
Dependencies (0)
None
Dev Dependencies (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE