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

cardinal-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

cardinal-spline - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

2

bower.json
{
"name": "cardinal-spline",
"main": "index.js",
"version": "0.0.0",
"version": "0.0.1",
"homepage": "https://github.com/stbaer/cardinal-spline",

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

@@ -5,5 +5,4 @@ /**

* Calculates an array containing points representing a cardinal spline through given point array.
* Points must be arranged as: [x1, y1, x2, y2, ..., xn, yn].
*
* @param {Array} points - point array
* @param {Array} points - (flat) point array: [x1, y1, x2, y2, ..., xn, yn]
* @param {Number} [tension=0.5] - tension. Typically between [0.0, 1.0] but can be exceeded

@@ -98,2 +97,2 @@ * @param {Number} [numOfSeg=25] - number of segments between two points (line resolution)

return res;
};
};
{
"name": "cardinal-spline",
"version": "0.0.0",
"version": "0.0.1",
"description": "cardinal spline function / browserify module",

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

# cardinal-spline
` var splinePoints = cSpline(points, tension, numOfSeg, close) -> 1D number array`
## Install
[![NPM](https://nodei.co/npm/cardinal-spline.png?downloads=true)](https://nodei.co/npm/cardinal-spline/)
`npm install cardinal-spline`
or with bower:
`bower install cardinal-spline`
## Use
```js
var cSpline = require('cardinal-spline');
var splinePoints = cSpline(points[, tension, numOfSeg, close]);
//-> splinePoints is a flat Float32Array, [x1, y1, x2, y2, ..., xn, yn]
```
### Options
```js
/**
* @param {Array} points - (flat) point array: [x1, y1, x2, y2, ..., xn, yn]
* @param {Number} [tension=0.5] - tension. Typically between [0.0, 1.0] but can be exceeded
* @param {Number} [numOfSeg=25] - number of segments between two points (line resolution)
* @param {Boolean} [close=false] - Close the ends making the line continuous
* @returns {Float32Array} - the spline points.
*/
```
## License
MIT
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