|
EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
|
Exponential smooth maximum for blending two signed-distance values. More...
#include <EBGeometry_Blend.hpp>
Public Member Functions | |
| T | operator() (const T &a, const T &b, const T &s) const noexcept |
| Evaluate the exponential smooth maximum. | |
Exponential smooth maximum for blending two signed-distance values.
Evaluates s log(exp(a/s) + exp(b/s)), the counterpart of ExpMinOp for intersections and differences: approximates max(a, b) and approaches it as s → 0. Computed as max(a, b) + s log1p(exp(-|a - b| / s)), which cannot overflow. A trivially copyable function object.
| T | Floating-point precision. |
|
inlinenoexcept |
Evaluate the exponential smooth maximum.
| [in] | a | First value. |
| [in] | b | Second value. |
| [in] | s | Smoothing length (must be > 0). |