diff options
author | Marko Zajc <marko@zajc.eu.org> | 2023-02-20 19:42:49 +0100 |
---|---|---|
committer | Marko Zajc <marko@zajc.eu.org> | 2023-02-20 19:42:49 +0100 |
commit | a135777fc65aa97f6bf4466b93ff898d5ce69e95 (patch) | |
tree | 53950ef421102a4d34e65bc9010e1520ecc50d0b | |
parent | 26d9a8f0dd8b807dc2970a4ac8463f179a7a7a98 (diff) |
Stop prepending *calc results with = when not necessary
-rw-r--r-- | src/main/java/libot/commands/CalculatorCommand.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/libot/commands/CalculatorCommand.java b/src/main/java/libot/commands/CalculatorCommand.java index 9300948..d964aaf 100644 --- a/src/main/java/libot/commands/CalculatorCommand.java +++ b/src/main/java/libot/commands/CalculatorCommand.java | |||
@@ -213,7 +213,7 @@ public class CalculatorCommand extends Command { | |||
213 | @Nonnull | 213 | @Nonnull |
214 | @SuppressWarnings("null") | 214 | @SuppressWarnings("null") |
215 | private static String parseResult(@Nonnull Result r) { | 215 | private static String parseResult(@Nonnull Result r) { |
216 | if (r.value().indexOf('=') != -1 && r.value().indexOf('≈') != -1) { | 216 | if (r.value().contains("=") || r.value().contains("≈")) { |
217 | if (r.approximate()) | 217 | if (r.approximate()) |
218 | return r.value().replace('=', '≈'); | 218 | return r.value().replace('=', '≈'); |
219 | else | 219 | else |