mirror of
https://github.com/PaddiM8/kalker.git
synced 2024-11-07 08:24:33 +01:00
Use the approximation sign for rounded imaginary numbers
This commit is contained in:
parent
d9a63396d6
commit
27e3c510f9
@ -51,7 +51,7 @@ impl CalculationResult {
|
||||
};
|
||||
|
||||
let decimal_count = if let Some(dot_index) = value.chars().position(|c| c == '.') {
|
||||
let end_index = value.chars().position(|c| c == ' ').unwrap_or(value.len()) - 1;
|
||||
let end_index = value.chars().position(|c| c == ' ' || c == 'i').unwrap_or(value.len()) - 1;
|
||||
|
||||
if end_index > dot_index { end_index - dot_index } else { 0 }
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user