Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/markknol/hx-mathparser
Evaluates math expressions. Written in Haxe.
https://github.com/markknol/hx-mathparser
expressions haxe math parser
Last synced: about 1 month ago
JSON representation
Evaluates math expressions. Written in Haxe.
- Host: GitHub
- URL: https://github.com/markknol/hx-mathparser
- Owner: markknol
- Created: 2014-04-02T18:50:19.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-07-16T07:43:35.000Z (over 5 years ago)
- Last Synced: 2023-06-29T18:29:10.050Z (over 1 year ago)
- Topics: expressions, haxe, math, parser
- Language: Haxe
- Homepage:
- Size: 7.81 KB
- Stars: 8
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
MathParser
==========Evaluates math expressions. Uses Haxe. I think it could be used in all platforms, no dependencies on haxe libs/OpenFl/Flambe.
### Examples
```haxe
MathParser.parse("1+2-3/4*5");
// returns -0.75MathParser.parse("1+2--3/4*5");
// returns 6.75MathParser.parse("(1+2--3)/4*5");
// returns 7.5MathParser.parse("(1+2- -3)/(((4*.5)))");
// returns 3.0MathParser.parse("(.1+.2- -.3)/(.4*.5)");
// returns 3.0000000000000004MathParser.parse("0xFF * 10");
// returns 2550
```
_The parser assumes that the given expression is valid_