Limit mathbot precision

This commit is contained in:
lemonsh 2022-07-17 21:16:28 +02:00
parent 508c6dc0fb
commit d700b030f3
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ impl Command for Eval {
let mut meval_ctx = meval::Context::new();
let value = meval::eval_str_with_context(expr, meval_ctx.var("x", *last_eval))?;
*last_eval = value;
Ok(format!("{} = {}", expr, value))
Ok(format!("{} = {:.10}", expr, value))
} else {
Ok("No expression to evaluate".into())
}