Skip to content

Commit

Permalink
updates readme
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-hanna committed Apr 22, 2021
1 parent 62c7aa1 commit 98a43ab
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Currently, this goal seek uses [Steffensen's Method](http://en.wikipedia.org/wik

## Usage

The package exports two error types, the function parameter type and one function, `goalSeek` as a default export:
The package exports three error types, the function parameter type and one function, `goalSeek` as a default export:

```typescript
export const IsNanError = TypeError('resulted in NaN');
Expand Down Expand Up @@ -85,7 +85,11 @@ To use the function, for example, with a simple linear equeation:

## Errors

This library will throw one of two errors: `IsNanError` or `FailedToConvergeError`.
This library will throw one of three errors: `InvalidInputsError`, `IsNanError` or `FailedToConvergeError`.

### InvalidInputsError

One of `percentTolerance` or `customToleranceFn` is required`. If one is not supplied, the `InvalidInputsError` is thrown. If both are supplied, `percentTolerance` is used.

### IsNanError

Expand Down Expand Up @@ -148,7 +152,7 @@ try {
console.log('error', e);
}

// result: 7
// result: 2E-5
```

## Licenses:
Expand Down

0 comments on commit 98a43ab

Please sign in to comment.