v1.1.0
This commit is contained in:
parent
7284422ec0
commit
efd5b63a0d
@ -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
|
## 1.0.2 - 2020 Oct 12
|
||||||
- Fix parsing of unit `Quarter` (#1)
|
- Fix parsing of unit `Quarter` (#1)
|
||||||
- Use division instead of multiplication when dividing numbers of the same unit `Quarter` (#1)
|
- Use division instead of multiplication when dividing numbers of the same unit `Quarter` (#1)
|
||||||
|
|||||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -12,7 +12,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cpc"
|
name = "cpc"
|
||||||
version = "1.0.2"
|
version = "1.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"decimal 2.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"decimal 2.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cpc"
|
name = "cpc"
|
||||||
version = "1.0.2"
|
version = "1.1.0"
|
||||||
description = "evaluates math expressions, with support for units and conversion between units"
|
description = "evaluates math expressions, with support for units and conversion between units"
|
||||||
authors = ["Kasper Henningsen"]
|
authors = ["Kasper Henningsen"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|||||||
@ -62,7 +62,7 @@ match eval("3m + 1cm", true, Unit::Celcius, false) {
|
|||||||
|
|
||||||
(4 + 1)km to light years
|
(4 + 1)km to light years
|
||||||
|
|
||||||
10m/2s * 5s
|
10m/2s * 5 trillion s
|
||||||
|
|
||||||
1 lightyear * 0.001mm in km2
|
1 lightyear * 0.001mm in km2
|
||||||
|
|
||||||
@ -165,9 +165,6 @@ match string {
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Potential Improvements
|
### 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
|
#### Potential unit types
|
||||||
Nice list of units: https://support.google.com/websearch/answer/3284611
|
Nice list of units: https://support.google.com/websearch/answer/3284611
|
||||||
- Currency: How would you go about dynamically updating the weights?
|
- Currency: How would you go about dynamically updating the weights?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user