polytan

1.0.0 • Public • Published

Polytangent

The tangent of a polynomial written in JavaScript!

Usage

The polytan module contains a function that finds the tangent line to a polynomial equation. The function takes an array of coefficients in ascending order and the x-coordinate of the point where the tangent touches the polynomial.

const calculate = require('polytan')

// f(x) = x^2 - 2x + 1
// touching point = (2, f(2))
console.log(calculate([1, -2, 1], 2)) 
// { slope: 2, intercept: -3 }
// g(t) = 2x - 3

/polytan/

    Package Sidebar

    Install

    npm i polytan

    Weekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    8.34 kB

    Total Files

    6

    Last publish

    Collaborators

    • fract