mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-10 02:34:20 +01:00
Be more explicit with pi() being the only nullary math function
This commit is contained in:
@@ -2492,9 +2492,18 @@ impl Program {
|
||||
}
|
||||
},
|
||||
crate::function::Func::Math(math_func) => match math_func.arity() {
|
||||
MathFuncArity::Nullary => {
|
||||
state.registers[*dest] = OwnedValue::Float(std::f64::consts::PI);
|
||||
}
|
||||
MathFuncArity::Nullary => match math_func {
|
||||
MathFunc::Pi => {
|
||||
state.registers[*dest] =
|
||||
OwnedValue::Float(std::f64::consts::PI);
|
||||
}
|
||||
_ => {
|
||||
unreachable!(
|
||||
"Unexpected mathematical Nullary function {:?}",
|
||||
math_func
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
MathFuncArity::Unary => {
|
||||
let reg_value = &state.registers[*start_reg];
|
||||
|
||||
Reference in New Issue
Block a user