fixed logarithm wrong-length message being incorrect

This commit is contained in:
Valerie Wolfe 2024-08-29 14:07:36 -04:00
parent 21b373af0e
commit ded7ed55b0

View file

@ -45,7 +45,7 @@ pub fn logarithm(arg: &Value) -> EvalResult {
Value::Tuple(tuple)
=> {
let len = tuple.len();
if len != 2 { return Err(EvalexprError::WrongOperatorArgumentAmount { expected: 2, actual: len }) }
if len != 2 { return Err(EvalexprError::wrong_function_argument_amount_range(len, 1..=2)); }
let i_value = tuple.get(0).unwrap();
if let Value::Float(float) = i_value { value = float.clone(); }