Skip to content

Commit

Permalink
Use the approximation sign for rounded imaginary numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
PaddiM8 committed Apr 3, 2024
1 parent d9a6339 commit 27e3c51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kalk/src/calculation_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 27e3c51

Please sign in to comment.