[Math] Make Vector3 and Vector4 CustomStringConvertable
This commit is contained in:
parent
77b0bf7014
commit
d536e8f04b
1 changed files with 12 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue