From 245bd8faebf1bb9bb775b2701e3a15aa7051d3f3 Mon Sep 17 00:00:00 2001 From: Alejandro Isaza Date: Sat, 5 May 2018 10:00:21 -0700 Subject: [PATCH] Fix dot product precedence --- Sources/Surge/Arithmetic.swift | 2 +- Sources/Surge/Matrix.swift | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Sources/Surge/Arithmetic.swift b/Sources/Surge/Arithmetic.swift index 84d744d4..4682230a 100644 --- a/Sources/Surge/Arithmetic.swift +++ b/Sources/Surge/Arithmetic.swift @@ -515,7 +515,7 @@ public func % (lhs: L, rhs: Double) -> [Double] where // MARK: Dot product -infix operator • +infix operator •: MultiplicationPrecedence public func • (lhs: L, rhs: R) -> Double where L.Element == Double, R.Element == Double { return dot(lhs, rhs) } diff --git a/Sources/Surge/Matrix.swift b/Sources/Surge/Matrix.swift index 7e1a29cc..573e3623 100644 --- a/Sources/Surge/Matrix.swift +++ b/Sources/Surge/Matrix.swift @@ -169,7 +169,6 @@ public func == (lhs: Matrix, rhs: Matrix) -> Bool { return lhs.rows == rhs.rows && lhs.columns == rhs.columns && lhs.grid == rhs.grid } - // MARK: - public func add(_ x: Matrix, _ y: Matrix) -> Matrix {