Skip to content

Commit

Permalink
v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
probablykasper committed Nov 14, 2020
1 parent 7284422 commit efd5b63
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 1.1.0 - 2020 Nov 14
- Added units of frequency
- Added support using foot-inch syntax with addition, like `2"+6'4"`
- Unsupported foot-inch syntax like `(6)'4"` and `6'4!"` now cause errors
- Fixed README.md stating the performance is 1000x slower than it actually is
- Fixed trailing percentage signs being ignored when `allow_trailing_operators` is true
- Fixed error caused by consecutive percentage signs

## 1.0.2 - 2020 Oct 12
- Fix parsing of unit `Quarter` (#1)
- Use division instead of multiplication when dividing numbers of the same unit `Quarter` (#1)
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cpc"
version = "1.0.2"
version = "1.1.0"
description = "evaluates math expressions, with support for units and conversion between units"
authors = ["Kasper Henningsen"]
edition = "2018"
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ match eval("3m + 1cm", true, Unit::Celcius, false) {
(4 + 1)km to light years
10m/2s * 5s
10m/2s * 5 trillion s
1 lightyear * 0.001mm in km2
Expand Down Expand Up @@ -165,9 +165,6 @@ match string {
```

### Potential Improvements
#### General
- The functions in units.rs have a lot of manual if statements. This could probably be replaced with a pretty advanced macro.
- Support for lexing words, like `one billion`
#### Potential unit types
Nice list of units: https://support.google.com/websearch/answer/3284611
- Currency: How would you go about dynamically updating the weights?
Expand Down

0 comments on commit efd5b63

Please sign in to comment.