mirror of
https://github.com/apple/swift-numerics
synced 2026-11-24 04:38:11 +00:00
Merge pull request #59 from t-ae/complex-signed-numeric
Make Complex SignedNumeric
This commit is contained in:
1 file changed
+2
-5
@@ -30,11 +30,6 @@ extension Complex: AdditiveArithmetic {
|
||||
public static func -=(z: inout Complex, w: Complex) {
|
||||
z = z - w
|
||||
}
|
||||
|
||||
@_transparent
|
||||
public static prefix func -(z: Complex) -> Complex {
|
||||
return Complex(-z.x, -z.y)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Vector space structure
|
||||
@@ -167,3 +162,5 @@ extension Complex: Numeric {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
extension Complex: SignedNumeric {}
|
||||
Reference in new issue
Block a user