From 578594636a4aa34b9327bf3b80f25349738ce6a0 Mon Sep 17 00:00:00 2001 From: Alexander Mohr Date: Wed, 28 May 2025 15:55:48 +0200 Subject: [PATCH] math mode, also prints binary representation now --- worf/src/lib/modes/math.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worf/src/lib/modes/math.rs b/worf/src/lib/modes/math.rs index 956ad4f..92931c9 100644 --- a/worf/src/lib/modes/math.rs +++ b/worf/src/lib/modes/math.rs @@ -232,7 +232,7 @@ fn calc(input: &str) -> String { }; match eval_expr(&mut tokens) { - Ok(Value::Int(i)) => format!("{i} (0x{i:X})"), + Ok(Value::Int(i)) => format!("{i} (0x{i:X}) (0b{i:b})"), Ok(Value::Float(f)) => format!("{f}"), Err(e) => e, }