WPILibC++ 2023.4.3-108-ge5452e3
sqrt.hpp File Reference

Go to the source code of this file.

Namespaces

namespace  internal
 

Functions

template<typename T >
constexpr T internal::sqrt_recur (const T x, const T xn, const int count) noexcept
 
template<typename T >
constexpr T internal::sqrt_check (const T x, const T m_val) noexcept
 
template<typename T >
constexpr return_t< T > sqrt (const T x) noexcept
 Compile-time square-root function. More...
 

Function Documentation

◆ sqrt()

template<typename T >
constexpr return_t< T > sqrt ( const T  x)
constexprnoexcept

Compile-time square-root function.

Parameters
xa real-valued input.
Returns
Computes \( \sqrt{x} \) using a Newton-Raphson approach.