triangle-incenter

1.0.2 • Public • Published

triangle-incenter

stable

Computes the incenter of a triangle. The vectors can be 2D, 3D, or n-dimensional.

var incenter = require('triangle-incenter')
 
var triangle2d = [ 
  [10, 0],
  [20, 2],
  [30, 1]
]
 
incenter(triangle2d)
// > [ 20.03678985362022, 1.2476878747362354 ]

Usage

NPM

incenter = triangleIncenter(triangle)

For the given triangle, an array of 3 vectors, computes the incenter.

Returns a new vector with the same dimension as the first point in triangle.

See Also

License

MIT, see LICENSE.md for details.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    3
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i triangle-incenter

Weekly Downloads

2

Version

1.0.2

License

MIT

Last publish

Collaborators

  • mattdesl