mirror of
https://github.com/PaddiM8/kalker.git
synced 2024-12-13 10:00:51 +01:00
Trimming zeroes at the start of scientific notation, and scientific notation exponent value fix
This commit is contained in:
parent
9212581ebd
commit
98014166a9
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -153,7 +153,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kalk"
|
||||
version = "1.2.3"
|
||||
version = "1.2.4"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
"regex",
|
||||
@ -163,7 +163,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kalk_cli"
|
||||
version = "0.3.5"
|
||||
version = "0.3.6"
|
||||
dependencies = [
|
||||
"ansi_term",
|
||||
"kalk",
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "kalk"
|
||||
version = "1.2.3"
|
||||
version = "1.2.4"
|
||||
authors = ["PaddiM8"]
|
||||
edition = "2018"
|
||||
readme = "README.md"
|
||||
|
@ -25,7 +25,7 @@ impl ScientificNotation {
|
||||
digits_and_mul.insert(1usize, '.');
|
||||
}
|
||||
|
||||
format!("{}{}10^{}", sign, digits_and_mul, self.exponent.to_string())
|
||||
format!("{}{}10^{}", sign, digits_and_mul, self.exponent - 1)
|
||||
}
|
||||
}
|
||||
|
||||
@ -74,6 +74,7 @@ impl KalkNum {
|
||||
ScientificNotation {
|
||||
negative: neg,
|
||||
digits: digits
|
||||
.trim_start_matches('0')
|
||||
.trim_end_matches('0')
|
||||
.trim_end_matches('.')
|
||||
.to_string(),
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "kalk_cli"
|
||||
version = "0.3.5"
|
||||
version = "0.3.6"
|
||||
authors = ["PaddiM8"]
|
||||
edition = "2018"
|
||||
readme = "../README.md"
|
||||
@ -16,7 +16,7 @@ path = "src/main.rs"
|
||||
name = "kalk"
|
||||
|
||||
[dependencies]
|
||||
kalk = { path = "../kalk", version = "^1.2.3" }
|
||||
kalk = { path = "../kalk", version = "^1.2.4" }
|
||||
rustyline = "7.0.0"
|
||||
ansi_term = "0.12"
|
||||
regex = "1"
|
||||
|
Loading…
Reference in New Issue
Block a user