# zero-crossings

> Finds all zero crossings in a 1D ndarray

Latest version **1.0.1** (published 2014-05-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install zero-crossings
pnpm add zero-crossings
yarn add zero-crossings
bun add zero-crossings
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2014-05-07 |
| First published | 2014-04-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Mikola Lysenko |
| Maintainers | mikolalysenko |
| Keywords | zero, crossing, ndarray, 1D, linear, interpolate |

## Links

- npm: https://www.npmjs.com/package/zero-crossings
- Repository: https://github.com/mikolalysenko/zero-crossings
- Issues: https://github.com/mikolalysenko/zero-crossings/issues
- npm.io page: https://npm.io/package/zero-crossings

## Dependencies (1)

- [cwise-compiler](https://npm.io/package/cwise-compiler.md) ^1.0.0

## Recent versions

- 1.0.1 (latest) — 2014-05-07
- 1.0.0 — 2014-04-10

## README

zero-crossings
==============
Finds all zero crossings in a 1D ndarray assuming piecewise-linear interpolation.

# Example

```javascript
var ndarray = require("ndarray")
var zc = require("zero-crossings")

var array = ndarray([1, -1, 0, 10, 3, -1])

console.log(zc(array))
```

Output:

```
[ 0.5, 2, 4.75 ]
```

# Install

```
npm install zero-crossings
```

# API

#### `require("zero-crossings")(array[,level])`
Finds all zero crossings in the 1D ndarray `array`

* `array` is a 1D ndarray
* `level` is an optional parameter which indicates the crossings

**Returns** A list of all zero crossings in `array`

# Credits
(c) 2014 Mikola Lysenko. MIT License

---
_Source: https://npm.io/package/zero-crossings · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
