Use the approximation sign for rounded imaginary numbers

This commit is contained in:
PaddiM8 2024-04-03 17:27:25 +02:00
parent d9a63396d6
commit 27e3c510f9

View File

@ -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 {