Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/weirongxu/vscode-calc
- Owner: weirongxu
- License: mit
- Created: 2019-10-01T05:59:59.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-08T12:28:38.000Z (10 months ago)
- Last Synced: 2024-04-15T00:15:38.392Z (9 months ago)
- Topics: calculate, mathematics, vscode, vscode-extension
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=raidou.calc
- Size: 184 KB
- Stars: 22
- Watchers: 2
- Forks: 7
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vscode-calc
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