tmp/tmp2dt_9p3p/{from.md → to.md}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
-
###
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template<class T> constexpr T real(const complex<T>& x);
|
| 5 |
```
|
| 6 |
|
|
@@ -23,35 +23,34 @@ template<class T> T arg(const complex<T>& x);
|
|
| 23 |
```
|
| 24 |
|
| 25 |
*Returns:* The phase angle of `x`, or `atan2(imag(x), real(x))`.
|
| 26 |
|
| 27 |
``` cpp
|
| 28 |
-
template<class T> T norm(const complex<T>& x);
|
| 29 |
```
|
| 30 |
|
| 31 |
*Returns:* The squared magnitude of `x`.
|
| 32 |
|
| 33 |
``` cpp
|
| 34 |
-
template<class T> complex<T> conj(const complex<T>& x);
|
| 35 |
```
|
| 36 |
|
| 37 |
*Returns:* The complex conjugate of `x`.
|
| 38 |
|
| 39 |
``` cpp
|
| 40 |
template<class T> complex<T> proj(const complex<T>& x);
|
| 41 |
```
|
| 42 |
|
| 43 |
*Returns:* The projection of `x` onto the Riemann sphere.
|
| 44 |
|
| 45 |
-
*Remarks:* Behaves the same as the C function `cproj`
|
| 46 |
-
7.3.9.
|
| 47 |
|
| 48 |
``` cpp
|
| 49 |
-
template<class T> complex<T> polar(const T& rho, const T& theta =
|
| 50 |
```
|
| 51 |
|
| 52 |
-
*
|
| 53 |
-
finite.
|
| 54 |
|
| 55 |
*Returns:* The `complex` value corresponding to a complex number whose
|
| 56 |
magnitude is `rho` and whose phase angle is `theta`.
|
| 57 |
|
|
|
|
| 1 |
+
### Value operations <a id="complex.value.ops">[[complex.value.ops]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template<class T> constexpr T real(const complex<T>& x);
|
| 5 |
```
|
| 6 |
|
|
|
|
| 23 |
```
|
| 24 |
|
| 25 |
*Returns:* The phase angle of `x`, or `atan2(imag(x), real(x))`.
|
| 26 |
|
| 27 |
``` cpp
|
| 28 |
+
template<class T> constexpr T norm(const complex<T>& x);
|
| 29 |
```
|
| 30 |
|
| 31 |
*Returns:* The squared magnitude of `x`.
|
| 32 |
|
| 33 |
``` cpp
|
| 34 |
+
template<class T> constexpr complex<T> conj(const complex<T>& x);
|
| 35 |
```
|
| 36 |
|
| 37 |
*Returns:* The complex conjugate of `x`.
|
| 38 |
|
| 39 |
``` cpp
|
| 40 |
template<class T> complex<T> proj(const complex<T>& x);
|
| 41 |
```
|
| 42 |
|
| 43 |
*Returns:* The projection of `x` onto the Riemann sphere.
|
| 44 |
|
| 45 |
+
*Remarks:* Behaves the same as the C function `cproj`. See also: ISO C
|
| 46 |
+
7.3.9.5
|
| 47 |
|
| 48 |
``` cpp
|
| 49 |
+
template<class T> complex<T> polar(const T& rho, const T& theta = T());
|
| 50 |
```
|
| 51 |
|
| 52 |
+
*Preconditions:* `rho` is non-negative and non-NaN. `theta` is finite.
|
|
|
|
| 53 |
|
| 54 |
*Returns:* The `complex` value corresponding to a complex number whose
|
| 55 |
magnitude is `rho` and whose phase angle is `theta`.
|
| 56 |
|