File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change 1
1
# `` Complex ``
2
2
3
- A Complex number type that conforms to ` AlgebraicField `
4
- (so all the normal arithmetic operations are available) and
5
- ` ElementaryFunctions ` (so all the usual math functions are
6
- available).
3
+ A complex number type represented by its real and imaginary parts, and equipped
4
+ with the usual arithmetic operators and math functions.
7
5
8
- A ` Complex ` value is represented with two ` RealType ` values, corresponding to
9
- the real and imaginary parts of the number.
6
+ ## Overview
10
7
11
8
You can access these Cartesian components using the real and imaginary
12
9
properties.
Original file line number Diff line number Diff line change 22
22
// Complex! Obviously, that doesn't help anyone.
23
23
24
24
extension Complex {
25
- /// `self` multiplied by the real value `a`.
25
+ /// The result of multiplying this value by the real number `a`.
26
26
///
27
27
/// Equivalent to `self * Complex(a)`, but may be computed more efficiently.
28
28
@inlinable @inline ( __always)
29
29
public func multiplied( by a: RealType ) -> Complex {
30
30
Complex ( x*a, y*a)
31
31
}
32
32
33
- /// `self` divided by the real value `a`.
33
+ /// The result of dividing this value by the real number `a`.
34
34
///
35
35
/// More efficient than `self / Complex(a)`. May not produce exactly the
36
36
/// same result, but will always be more accurate if they differ.
You can’t perform that action at this time.
0 commit comments