std::proj<div class="t-tr-text">(Std :: complesso)<div class="t-tr-dropdown"><div><div><div class="t-tr-dropdown-arrow-border"></div><div class="t-tr-dropdown-arrow"></div><div class="t-tr-dropdown-h">Original:</div><div class="t-tr-dropdown-orig">(std::complex)</div><div class="t-tr-dropdown-notes">The text has been machine-translated via [http://translate.google.com Google Translate].<br/> You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.</div></div></div></div></div>
Da cppreference.com.
![]() | Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate. La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
Elemento definito nell'header <complex> | ||
template<class T > complex<T> proj(const complex<T>& z ); | (dal C++11) | |
Restituisce la proiezione del
z
numero complesso sulla sfera Riemann.Original:
Returns the projection of the complex number
z
onto the Riemann sphere.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Per la maggior parte
z
, std::proj(z)==z, ma tutti gli infiniti complessi, anche i numeri in cui un componente è infinito e l'altro è NaN, diventare reale positivo infinito, (INFINITY, 0) o (INFINITY, -0). Il segno dell'immaginario (zero) componente è il segno di std::imag(z). Original:
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, (INFINITY, 0) or (INFINITY, -0). The sign of the imaginary (zero) component is the sign of std::imag(z). The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Indice |
[modifica]Parametri
z | - | valore complesso Original: complex value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[modifica]Valore di ritorno
la proiezione di
z
sulla sfera di RiemannOriginal:
the projection of
z
onto the Riemann sphereThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[modifica]Esempio
#include <iostream>#include <complex> int main(){std::complex<double> c1(1, 2);std::cout<<"proj"<< c1 <<" = "<< std::proj(c1)<<'\n'; std::complex<double> c2(INFINITY, -1);std::cout<<"proj"<< c2 <<" = "<< std::proj(c2)<<'\n'; std::complex<double> c3(0, -INFINITY);std::cout<<"proj"<< c3 <<" = "<< std::proj(c3)<<'\n';}
Output:
proj(1,2) = (1,2) proj(inf,-1) = (inf,-0) proj(0,-inf) = (inf,-0)
[modifica]Vedi anche
restituisce la grandezza di un numero complesso Original: returns the magnitude of a complex number The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (funzione di modello) | |
restituisce la grandezza quadrato Original: returns the squared magnitude The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (funzione di modello) | |
costruisce un numero complesso di ampiezza e di fase Original: constructs a complex number from magnitude and phase angle The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (funzione di modello) |