From c2f110ed0c893df16ebc6a6fc19a977f84cd7896 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Fri, 22 Dec 2023 08:02:12 -0500 Subject: [PATCH] feat(const_eval): impl. `atanh` --- CHANGELOG.md | 1 + naga/src/proc/constant_evaluator.rs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5540a058..9bfea9f35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ Bottom level categories: - `asin` - `asinh` - `atan` + - `atanh` - `cos` - `cosh` - `round` diff --git a/naga/src/proc/constant_evaluator.rs b/naga/src/proc/constant_evaluator.rs index 4bfdb8112..3b3ba5620 100644 --- a/naga/src/proc/constant_evaluator.rs +++ b/naga/src/proc/constant_evaluator.rs @@ -834,6 +834,9 @@ impl<'a> ConstantEvaluator<'a> { crate::MathFunction::Atan => { component_wise_float!(self, span, [arg], |e| { Ok([e.atan()]) }) } + crate::MathFunction::Atanh => { + component_wise_float!(self, span, [arg], |e| { Ok([e.atanh()]) }) + } crate::MathFunction::Pow => self.math_pow(arg, arg1.unwrap(), span), crate::MathFunction::Clamp => { component_wise_scalar!(