New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cubic-hermite-spline

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cubic-hermite-spline - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

6

index.js
function interpolate(t, points, tangents, knots, derivative) {
function interpolate(t, points, tangents, knots, derivative, result) {
var n = points.length; // number or points / tangents / knots
var d = points[0].length; // vector dimensionality
var v = new Array(d); // destination vector
var v = result || new Array(d); // destination vector

@@ -25,3 +25,3 @@ if(knots) {

var t = (t - k0) / scale;
t = (t - k0) / scale;

@@ -28,0 +28,0 @@ } else {

{
"name": "cubic-hermite-spline",
"version": "1.0.0",
"version": "1.0.1",
"description": "Cubic Hermite spline interpolation",

@@ -14,3 +14,9 @@ "main": "index.js",

"url": "git://github.com/thibauts/cubic-hermite-spline.git"
}
},
"keywords": [
"cubic",
"hermite",
"spline",
"interpolation"
]
}

@@ -5,3 +5,3 @@ cubic-hermite-spline

Cubic Hermite spline interpolation of points / tangeants in any dimension with optional derivative computation. The interpolator can also take a knot-like vector as an optional parameter, which may be useful to enforce time at control points when used for position / velocity interpolation.
[Cubic Hermite spline](http://en.wikipedia.org/wiki/Cubic_Hermite_spline) interpolation of points / tangeants in any dimension with optional derivative computation. The interpolator can also take a knot-like vector as an optional parameter, which may be useful to enforce time at control points when used for position / velocity interpolation.

@@ -78,3 +78,3 @@

### `hermite(t, points, tangents[, knots, derivative])`
### `hermite(t, points, tangents[, knots, derivative, result])`

@@ -88,1 +88,4 @@ Computes the interpolation at `t` for the provided set of points and tangents, and optional knots.

* `derivative` if true return the tangeant at `t` instead of the position
* `result` preallocated array in which the result will be stored (avoid GC)
**Returns** the interpolated vector
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