Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

victor

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

victor - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

test.js

2

bower.json

@@ -8,3 +8,3 @@ {

},
"version": "1.0.0",
"version": "1.1.0",
"homepage": "https://github.com/maxkueng/victor",

@@ -11,0 +11,0 @@ "authors": [

@@ -793,2 +793,23 @@ exports = module.exports = Victor;

/**
* Rounds both axis to a certain precision
*
* ### Examples:
* var vec = new Victor(100.2, 50.9);
*
* vec.unfloat();
* vec.toString();
* // => x:100, y:51
*
* @param {Number} Precision (default: 8)
* @return {Victor} `this` for chaining capabilities
* @api public
*/
Victor.prototype.toFixed = function (precision) {
if (typeof precision === 'undefined') { precision = 8; }
this.x = this.x.toFixed(precision);
this.y = this.y.toFixed(precision);
return this;
};
/**
* Performs a linear blend / interpolation of the X axis towards another vector

@@ -795,0 +816,0 @@ *

{
"name": "victor",
"version": "1.0.0",
"version": "1.1.0",
"description": "A JavaScript 2D vector class with methods for common vector operations",

@@ -5,0 +5,0 @@ "keywords": [

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