From cd4a8b41cf637c220a9fe8292a65954a3b4ca219 Mon Sep 17 00:00:00 2001 From: araki Date: Sat, 9 Nov 2019 02:21:44 +0900 Subject: [PATCH] Make Complex SignedNumeric --- Sources/Complex/Arithmetic.swift | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Sources/Complex/Arithmetic.swift b/Sources/Complex/Arithmetic.swift index 9d75f23..caa6727 100644 --- a/Sources/Complex/Arithmetic.swift +++ b/Sources/Complex/Arithmetic.swift @@ -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 {}