WPILibC++ 2023.4.3
beta.hpp File Reference

Go to the source code of this file.

Functions

template<typename T1 , typename T2 >
constexpr common_return_t< T1, T2 > beta (const T1 a, const T2 b) noexcept
 Compile-time beta function. More...
 

Function Documentation

◆ beta()

template<typename T1 , typename T2 >
constexpr common_return_t< T1, T2 > beta ( const T1  a,
const T2  b 
)
constexprnoexcept

Compile-time beta function.

Parameters
aa real-valued input.
ba real-valued input.
Returns
the beta function using

\[ \text{B}(\alpha,\beta) := \int_0^1 t^{\alpha - 1} (1-t)^{\beta - 1} dt = \frac{\Gamma(\alpha)\Gamma(\beta)}{\Gamma(\alpha + \beta)} \]

where \( \Gamma \) denotes the gamma function.