Namespaces
Variants
Actions

std::proj(std::complex)

From cppreference.com
< cpp‎ | numeric‎ | complex
 
 
 
 
Defined in header <complex>
template< class T >
std::complex<T> proj( const std::complex<T>& z );
(1) (since C++11)
Additional overloads (since C++11)
Defined in header <complex>
(A)
std::complex<float>       proj( float f );

std::complex<double>      proj( double f );

std::complex<long double> proj( long double f );
(until C++23)
template< class FloatingPoint >
std::complex<FloatingPoint> proj( FloatingPoint f );
(since C++23)
template< class Integer >
std::complex<double> proj( Integer i );
(B)
1) Returns the projection of the complex number z onto the Riemann sphere.
For most z, std::proj(z) == z, but all complex infinities, even the numbers where one component is infinite and the other is NaN, become positive real infinity, (