You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/standard-library/algorithm.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ The C++ Standard Library numeric algorithms that are provided for numerical proc
36
36
37
37
### Function templates
38
38
39
-
|Function template|Description|
39
+
|||
40
40
|-|-|
41
41
|[adjacent_find](../standard-library/algorithm-functions.md#adjacent_find)|Searches for two adjacent elements that are either equal or satisfy a specified condition.|
42
42
|[all_of](../standard-library/algorithm-functions.md#all_of)|Returns **true** when a condition is present at each element in the given range.|
Copy file name to clipboardExpand all lines: docs/standard-library/complex-class.md
+28-30Lines changed: 28 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,42 +30,40 @@ In particular, no subtle differences may exist between copy construction and def
30
30
31
31
Explicit specializations of template class complex exist for the three floating-point types. In this implementation, a value of any other type `Type` is typecast to **double** for actual calculations, with the **double** result assigned back to the stored object of type `Type`.
32
32
33
+
## Members
34
+
33
35
### Constructors
34
36
35
-
|Constructor|Description|
37
+
|||
36
38
|-|-|
37
39
|[complex](#complex)|Constructs a complex number with specified real and imaginary parts or as a copy of some other complex number.|
38
40
39
41
### Typedefs
40
42
41
-
|Type name|Description|
43
+
|||
42
44
|-|-|
43
45
|[value_type](#value_type)|A type that represents the data type used to represent the real and imaginary parts of a complex number.|
44
46
45
-
### Member functions
47
+
### Functions
46
48
47
-
|Member function|Description|
49
+
|||
48
50
|-|-|
49
51
|[imag](#imag)|Extracts the imaginary component of a complex number.|
50
52
|[real](#real)|Extracts the real component of a complex number.|
51
53
52
54
### Operators
53
55
54
-
|Operator|Description|
56
+
|||
55
57
|-|-|
56
58
|[operator*=](#op_star_eq)|Multiplies a target complex number by a factor, which may be complex or be the same type as are the real and imaginary parts of the complex number.|
57
59
|[operator+=](#op_add_eq)|Adds a number to a target complex number, where the number added may be complex or of the same type as are the real and imaginary parts of the complex number to which it is added.|
58
60
|[operator-=](#operator-_eq)|Subtracts a number from a target complex number, where the number subtracted may be complex or of the same type as are the real and imaginary parts of the complex number to which it is added.|
59
61
|[operator/=](#op_div_eq)|Divides a target complex number by a divisor, which may be complex or be the same type as are the real and imaginary parts of the complex number.|
60
62
|[operator=](#op_eq)|Assigns a number to a target complex number, where the number assigned may be complex or of the same type as are the real and imaginary parts of the complex number to which it is being assigned.|
61
63
62
-
## Requirements
63
-
64
-
**Header**: \<complex>
65
64
66
-
**Namespace:** std
67
65
68
-
## <a name="complex"></a> complex::complex
66
+
## <a name="complex"></a> complex
69
67
70
68
Constructs a complex number with specified real and imaginary parts or as a copy of some other complex number.
71
69
@@ -81,13 +79,13 @@ constexpr complex(
81
79
82
80
### Parameters
83
81
84
-
*_RealVal*<br/>
82
+
*_RealVal*\
85
83
The value of the real part used to initialize the complex number being constructed.
86
84
87
-
*_ImagVal*<br/>
85
+
*_ImagVal*\
88
86
The value of the imaginary part used to initialize the complex number being constructed.
89
87
90
-
*complexNum*<br/>
88
+
*complexNum*\
91
89
The complex number whose real and imaginary parts are used to initialize the complex number being constructed.
92
90
93
91
### Remarks
@@ -149,7 +147,7 @@ int main( )
149
147
}
150
148
```
151
149
152
-
## <a name="imag"></a> complex::imag
150
+
## <a name="imag"></a> imag
153
151
154
152
Extracts the imaginary component of a complex number.
155
153
@@ -161,7 +159,7 @@ T imag(const T& right);
161
159
162
160
### Parameters
163
161
164
-
*right*<br/>
162
+
*right*\
165
163
A complex number whose imaginary value is to be extracted.
166
164
167
165
### Return Value
@@ -203,7 +201,7 @@ The real part of c1 is c1.real() = 4.
203
201
The imaginary part of c1 is c1.imag() = 3.
204
202
```
205
203
206
-
## <aname="op_star_eq"></a> complex::operator*=
204
+
## <aname="op_star_eq"></a> operator*=
207
205
208
206
Multiplies a target complex number by a factor, which may be complex or be the same type as are the real and imaginary parts of the complex number.
A complex number or a number that is of the same type as the parameter of the target complex number.
223
221
224
222
### Return Value
@@ -288,7 +286,7 @@ int main()
288
286
}
289
287
```
290
288
291
-
## <aname="op_add_eq"></a> complex::operator+=
289
+
## <aname="op_add_eq"></a> operator+=
292
290
293
291
Adds a number to a target complex number, where the number added may be complex or of the same type as are the real and imaginary parts of the complex number to which it is added.
A complex number or a number that is of the same type as the parameter of the target complex number.
308
306
309
307
### Return Value
@@ -391,7 +389,7 @@ The modulus of cl2 is: 5
391
389
The argument of cl2 is: 0.927295 radians, which is 53.1301 degrees.
392
390
```
393
391
394
-
## <aname="operator-_eq"></a> complex::operator-=
392
+
## <aname="operator-_eq"></a> operator-=
395
393
396
394
Subtracts a number from a target complex number, where the number subtracted may be complex or of the same type as are the real and imaginary parts of the complex number to which it is added.
A complex number to be subtracted from the target complex number.
519
517
520
-
*_RealPart*<br/>
518
+
*_RealPart*\
521
519
A real number to be subtracted from the target complex number.
522
520
523
521
### Return Value
@@ -603,7 +601,7 @@ The modulus of cl2 is: 0.6
603
601
The argument of cl2 is: 0.523599 radians, which is 30 degrees.
604
602
```
605
603
606
-
## <aname="op_eq"></a> complex::operator=
604
+
## <aname="op_eq"></a> operator=
607
605
608
606
Assigns a number to a target complex number, where the number assigned may be complex or of the same type as are the real and imaginary parts of the complex number to which it is being assigned.
0 commit comments