tmp/tmpx4o_8rsi/{from.md → to.md}
RENAMED
|
@@ -1,23 +1,21 @@
|
|
| 1 |
-
###
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template<class T> constexpr complex(const T& re = T(), const T& im = T());
|
| 5 |
```
|
| 6 |
|
| 7 |
-
*
|
| 8 |
-
|
| 9 |
-
*Postconditions:* `real() == re && imag() == im`.
|
| 10 |
|
| 11 |
``` cpp
|
| 12 |
constexpr T real() const;
|
| 13 |
```
|
| 14 |
|
| 15 |
*Returns:* The value of the real component.
|
| 16 |
|
| 17 |
``` cpp
|
| 18 |
-
void real(T val);
|
| 19 |
```
|
| 20 |
|
| 21 |
*Effects:* Assigns `val` to the real component.
|
| 22 |
|
| 23 |
``` cpp
|
|
@@ -25,10 +23,10 @@ constexpr T imag() const;
|
|
| 25 |
```
|
| 26 |
|
| 27 |
*Returns:* The value of the imaginary component.
|
| 28 |
|
| 29 |
``` cpp
|
| 30 |
-
void imag(T val);
|
| 31 |
```
|
| 32 |
|
| 33 |
*Effects:* Assigns `val` to the imaginary component.
|
| 34 |
|
|
|
|
| 1 |
+
### Member functions <a id="complex.members">[[complex.members]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template<class T> constexpr complex(const T& re = T(), const T& im = T());
|
| 5 |
```
|
| 6 |
|
| 7 |
+
*Ensures:* `real() == re && imag() == im` is `true`.
|
|
|
|
|
|
|
| 8 |
|
| 9 |
``` cpp
|
| 10 |
constexpr T real() const;
|
| 11 |
```
|
| 12 |
|
| 13 |
*Returns:* The value of the real component.
|
| 14 |
|
| 15 |
``` cpp
|
| 16 |
+
constexpr void real(T val);
|
| 17 |
```
|
| 18 |
|
| 19 |
*Effects:* Assigns `val` to the real component.
|
| 20 |
|
| 21 |
``` cpp
|
|
|
|
| 23 |
```
|
| 24 |
|
| 25 |
*Returns:* The value of the imaginary component.
|
| 26 |
|
| 27 |
``` cpp
|
| 28 |
+
constexpr void imag(T val);
|
| 29 |
```
|
| 30 |
|
| 31 |
*Effects:* Assigns `val` to the imaginary component.
|
| 32 |
|