From bdf1cb4ec317304c20d53d7726a4380fc70c98e6 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Fri, 5 Jan 2024 10:56:24 -0500 Subject: [PATCH] feat(const_eval): impl. `tan` --- CHANGELOG.md | 1 + naga/src/proc/constant_evaluator.rs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6b1ccc53..586c943f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,7 @@ Bottom level categories: - `sinh` - `sqrt` - `step` + - `tan` ## v0.19.0 (2024-01-17) diff --git a/naga/src/proc/constant_evaluator.rs b/naga/src/proc/constant_evaluator.rs index bb5a62410..bdf9eec20 100644 --- a/naga/src/proc/constant_evaluator.rs +++ b/naga/src/proc/constant_evaluator.rs @@ -869,6 +869,9 @@ impl<'a> ConstantEvaluator<'a> { crate::MathFunction::Sinh => { component_wise_float!(self, span, [arg], |e| { Ok([e.sinh()]) }) } + crate::MathFunction::Tan => { + component_wise_float!(self, span, [arg], |e| { Ok([e.tan()]) }) + } crate::MathFunction::Sqrt => { component_wise_float!(self, span, [arg], |e| { Ok([e.sqrt()]) }) }