https://github.com/indus/nicetix
https://github.com/indus/nicetix
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/indus/nicetix
- Owner: indus
- License: other
- Created: 2024-11-01T14:56:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-01T18:23:53.000Z (over 1 year ago)
- Last Synced: 2025-03-24T12:08:20.063Z (about 1 year ago)
- Language: TypeScript
- Size: 1.53 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# nicetix
The **nicetix** function returns an array of evenly spaced, "nice" numbers based on a given minimum, maximum, and an upper limit on the number of values you want.
**Note:** The number of values returned may not exactly match the requested number. In some cases, it may be only half of the specified amount, but it will never exceed the requested limit.
```sh
$ npm install nicetix
```
```JS
import nicetix from "nicetix";
// nicetix(min, max, )
let ticks = nicetix(-1.23, 12.3, 7);
//-> [-2.5, 0, 2.5, 5, 7.5, 10, 12.5]
```