feat(const_eval): impl. min

This commit is contained in:
Erich Gubler 2024-01-26 12:17:31 -05:00 committed by Teodor Tanasoaia
parent abcc6ddff3
commit c559be933b
2 changed files with 6 additions and 0 deletions

View File

@ -81,6 +81,7 @@ Bottom level categories:
- `log`
- `log2`
- `max`
- `min`
- `radians`
- `reverseBits`
- `sign`

View File

@ -961,6 +961,11 @@ impl<'a> ConstantEvaluator<'a> {
Ok([e1.max(e2)])
})
}
crate::MathFunction::Min => {
component_wise_scalar!(self, span, [arg, arg1.unwrap()], |e1, e2| {
Ok([e1.min(e2)])
})
}
crate::MathFunction::Radians => {
component_wise_float!(self, span, [arg], |e1| { Ok([e1.to_radians()]) })
}