Skip to content

Commit 1cb017c

Browse files
feat(const_eval): impl. atan
1 parent 4fa8092 commit 1cb017c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ Wgpu now exposes backend feature for the Direct3D 12 (`dx12`) and Metal (`metal`
9292
- `acosh`
9393
- `asin`
9494
- `asinh`
95+
- `atan`
9596
- `cos`
9697
- `cosh`
9798
- `round`

naga/src/proc/constant_evaluator.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -830,6 +830,9 @@ impl<'a> ConstantEvaluator<'a> {
830830
crate::MathFunction::Asinh => {
831831
component_wise_float!(self, span, [arg], |e| { Ok([e.asinh()]) })
832832
}
833+
crate::MathFunction::Atan => {
834+
component_wise_float!(self, span, [arg], |e| { Ok([e.atan()]) })
835+
}
833836
crate::MathFunction::Pow => self.math_pow(arg, arg1.unwrap(), span),
834837
crate::MathFunction::Clamp => {
835838
component_wise_scalar!(

0 commit comments

Comments
 (0)