diff --git a/Sources/Vector3+nosimd.swift b/Sources/Vector3+nosimd.swift index f31c3b3..1fd99f8 100644 --- a/Sources/Vector3+nosimd.swift +++ b/Sources/Vector3+nosimd.swift @@ -60,7 +60,7 @@ public struct Vector3f { } } -extension Vector3f: Equatable { +extension Vector3f { public var lengthSquared: Float { return x * x + y * y + z * z @@ -118,10 +118,6 @@ extension Vector3f: Equatable { return Vector3f(lhs.x / rhs, lhs.y / rhs, lhs.z / rhs) } - public static func ==(lhs: Vector3f, rhs: Vector3f) -> Bool { - return lhs.x == rhs.x && lhs.y == rhs.y && lhs.z == rhs.z - } - public static func ~=(lhs: Vector3f, rhs: Vector3f) -> Bool { return lhs.x ~= rhs.x && lhs.y ~= rhs.y && lhs.z ~= rhs.z } @@ -138,4 +134,10 @@ extension Vector3f: Equatable { return rhs * lhs } } + +extension Vector3f: Equatable { + public static func ==(lhs: Vector3f, rhs: Vector3f) -> Bool { + return lhs.x == rhs.x && lhs.y == rhs.y && lhs.z == rhs.z + } +} #endif diff --git a/Sources/Vector3+simd.swift b/Sources/Vector3+simd.swift index 341cac6..c2a131f 100644 --- a/Sources/Vector3+simd.swift +++ b/Sources/Vector3+simd.swift @@ -126,4 +126,10 @@ public extension Vector3f { } } +extension Vector3f: Equatable { + public static func ==(lhs: Vector3f, rhs: Vector3f) -> Bool { + return lhs.d == rhs.d + } +} + #endif