Socket
Socket
Sign inDemoInstall

vec3

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vec3 - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

6

index.js

@@ -96,2 +96,8 @@ var util = require('util');

};
Vec3.prototype.min = function(other) {
return new Vec3(Math.min(this.x, other.x), Math.min(this.y, other.y), Math.min(this.z, other.z));
};
Vec3.prototype.max = function(other) {
return new Vec3(Math.max(this.x, other.x), Math.max(this.y, other.y), Math.max(this.z, other.z));
};

@@ -98,0 +104,0 @@ function euclideanMod(numerator, denominator) {

2

package.json
{
"name": "vec3",
"version": "0.1.0",
"version": "0.1.1",
"description": "3d vector math with good unit tests",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -182,2 +182,18 @@ var v = require('../')

});
it("min", function() {
var v1 = new Vec3(-1, 0, 1);
var v2 = new Vec3(10, -10, 1.1);
var v3 = v1.min(v2);
assert.strictEqual(v3.x, -1);
assert.strictEqual(v3.y, -10);
assert.strictEqual(v3.z, 1);
});
it("max", function() {
var v1 = new Vec3(-1, 0, 1);
var v2 = new Vec3(10, -10, 1.1);
var v3 = v1.max(v2);
assert.strictEqual(v3.x, 10);
assert.strictEqual(v3.y, 0);
assert.strictEqual(v3.z, 1.1);
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc