Last few review notes on complex.

This commit is contained in:
Stephen Canon committed 2025-08-12 15:13:07 -04:00
1 parent 221387985a
commit 2c19b7b8cd
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.
+2 -2
View File
@@ -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.