Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/weirongxu/vscode-calc

Calculate extension for vscode
https://github.com/weirongxu/vscode-calc

calculate mathematics vscode vscode-extension

Last synced: about 2 months ago
JSON representation

Calculate extension for vscode

Awesome Lists containing this project

README

        

# vscode-calc


vscode-calc



Build Status



Calculate extension for vscode

## Features

- Support underscores in numbers `10_000_000`
- Support bignumber, use [decimal.js](https://github.com/MikeMcl/decimal.js)
- Support [Mathematics functions](http://mikemcl.github.io/decimal.js/#methods)

![screenshot](https://user-images.githubusercontent.com/1709861/65939023-3987ce80-e457-11e9-8e4b-35a3287b1d8a.gif)

## Usage

1. Input calculate expression
```
sin(PI / 2) =
```

## Operators

Precedence is from highest to lowest.

| Operator | Example |
| ------------------------------------- | ------------------------------------------- |
| exponentiation `**` | `4 ** 3 ** 2` equivalent to `4 ** (3 ** 2)` |
| unary `+ -` | `-2` `+2` |
| multiply / divide / remainder `* / %` | `4 % 3` `4 * 3` |
| addition / subtraction | `.2 - .1` `.1 + .2` |

## Mathematics Constant

- `E`
- `PI`

## Mathematics Functions

```
abs, acos, acosh, add, asin,
asinh, atan, atanh, atan2, cbrt
ceil, cos, cosh, div, exp,
floor, hypot, ln, log, log2,
log10, max, min, mod, mul,
pow, random, round, sign, sin,
sinh, sqrt, sub, tan, tanh, trunc
```

Details: http://mikemcl.github.io/decimal.js/#methods

## License

MIT