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

vizabi-interpolators

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vizabi-interpolators - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

38

interpolators.js

@@ -8,24 +8,18 @@ /*

//
var VizabiInterpolators = (function() {
return {
linear: function(x1, x2, y1, y2, x) {
return +y1 + (y2 - y1) * (x - x1) / (x2 - x1);
},
exp: function(x1, x2, y1, y2, x) {
return Math.exp((Math.log(y1) * (x2 - x) - Math.log(y2) * (x1 - x)) / (x2 - x1));
},
stepBefore: function(x1, x2, y1, y2, x) {
return y2;
},
stepAfter: function(x1, x2, y1, y2, x) {
return y1;
},
stepMiddle: function(x1, x2, y1, y2, x) {
return (x < (x1 + x2)/2) ? y1 : y2;
}
export default {
linear: function(x1, x2, y1, y2, x) {
return +y1 + (y2 - y1) * (x - x1) / (x2 - x1);
},
exp: function(x1, x2, y1, y2, x) {
return Math.exp((Math.log(y1) * (x2 - x) - Math.log(y2) * (x1 - x)) / (x2 - x1));
},
stepBefore: function(x1, x2, y1, y2, x) {
return y2;
},
stepAfter: function(x1, x2, y1, y2, x) {
return y1;
},
stepMiddle: function(x1, x2, y1, y2, x) {
return (x < (x1 + x2)/2) ? y1 : y2;
}
}());
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
module.exports = VizabiInterpolators;
}
};
{
"name": "vizabi-interpolators",
"version": "1.0.1",
"version": "1.1.0",
"description": "Interpolator functions shared between vizabi and waffle server",

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

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