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

arc-length

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arc-length

Compute the arc-length of an n-dimensional parameterized curve

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

arc-length Build Status npm version js-standard-style

Compute the arc length of an n-dimensional curve using Romberg integration

Introduction

This module computes the arc length of a parameterized n-dimensional curve using adaptive Romberg integration.

Example

To compute the circumference of a circle:

var arcLength = require('arc-length')

arcLength([Math.cos, Math.sin], 0, Math.PI * 2)
//=> 6.283185307178426

Installation

$ npm install arc-length

API

require('arc-length')(y, start, end[, tol=1e-8 [, mindepth=2, maxdepth=10]]])

Arguments:

  • y: An Array of functions of a single parameter which define the curve.
  • start: The lower bound of integration.
  • end: The upper bound of integration.
  • tol (optional, default: 1e-8): The relative error tolerance
  • mindepth (optional, default: 2): The minimum recursion depth for adaptive integration
  • maxdepth (optional, default: 10): The maximum recursion depth for adaptive integration

Returns: Returns the scalar arc length

License

© 2016 Ricky Reusser. MIT License.

Keywords

FAQs

Package last updated on 11 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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