From d536e8f04b38c561c46115b6018c597b9bf5ab36 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Thu, 12 Nov 2015 23:20:18 -0800 Subject: [PATCH] [Math] Make Vector3 and Vector4 CustomStringConvertable --- Math/Math/Vector.swift | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Math/Math/Vector.swift b/Math/Math/Vector.swift index 34538e8..9cf459a 100644 --- a/Math/Math/Vector.swift +++ b/Math/Math/Vector.swift @@ -108,6 +108,12 @@ public struct Vector3: Vector { } } +extension Vector3: CustomStringConvertible { + public var description: String { + return "<\(x), \(y), \(z)>" + } +} + public struct Vector4: Vector { private var data: [Float] @@ -157,6 +163,12 @@ public struct Vector4: Vector { } } +extension Vector4: CustomStringConvertible { + public var description: String { + return "<\(x), \(y), \(z), \(w)>" + } +} + // MARK: - Operators extension Vector {