mirror of
https://github.com/apple/swift-numerics
synced 2026-11-22 04:30:45 +00:00
Last few review notes on complex.
This commit is contained in:
2 files changed
+5
-8
No files matched your search
@@ -1,12 +1,9 @@
|
||||
# ``Complex``
|
||||
|
||||
A Complex number type that conforms to `AlgebraicField`
|
||||
(so all the normal arithmetic operations are available) and
|
||||
`ElementaryFunctions` (so all the usual math functions are
|
||||
available).
|
||||
A complex number type represented by its real and imaginary parts, and equipped
|
||||
with the usual arithmetic operators and math functions.
|
||||
|
||||
A `Complex` value is represented with two `RealType` values, corresponding to
|
||||
the real and imaginary parts of the number.
|
||||
## Overview
|
||||
|
||||
You can access these Cartesian components using the real and imaginary
|
||||
properties.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
// Complex! Obviously, that doesn't help anyone.
|
||||
|
||||
extension Complex {
|
||||
/// `self` multiplied by the real value `a`.
|
||||
/// The result of multiplying this value by the real number `a`.
|
||||
///
|
||||
/// Equivalent to `self * Complex(a)`, but may be computed more efficiently.
|
||||
@inlinable @inline(__always)
|
||||
@@ -30,7 +30,7 @@ extension Complex {
|
||||
Complex(x*a, y*a)
|
||||
}
|
||||
|
||||
/// `self` divided by the real value `a`.
|
||||
/// The result of dividing this value by the real number `a`.
|
||||
///
|
||||
/// More efficient than `self / Complex(a)`. May not produce exactly the
|
||||
/// same result, but will always be more accurate if they differ.
|
||||
|
||||
Reference in new issue
Block a user