xieite ::pi <>
Defined in header <xieite/math/pi.hpp>
std ::numbers ::pi_v <>
but also accepts integer types.Declaration
#0template <xieite ::is_arith Arith =double >constexpr Arith pi <Arith > =std ::numbers ::pi_v <Arith >;
#1
template <std ::integral Int >constexpr Int pi <Int > =static_cast <Int >(std ::numbers ::pi );
Example
Output:int main () {std ::println (" ,{} "xieite ::pi <int >); }
[View in Compiler Explorer]3