From 86f0b0f8ca5969052701b256ef61639dae119bb8 Mon Sep 17 00:00:00 2001
From: faiface <faiface@ksp.sk>
Date: Sat, 19 Nov 2016 14:34:37 +0100
Subject: [PATCH] improve doc on vec

---
 vec.go | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/vec.go b/vec.go
index 89467dc..b934b42 100644
--- a/vec.go
+++ b/vec.go
@@ -37,7 +37,11 @@ func V(x, y float64) Vec {
 	return Vec(complex(x, y))
 }
 
-// String returns the string representation of a vector u as "Vec(x, y)".
+// String returns the string representation of a vector u.
+//
+//   u := pixel.V(4.5, -1.3)
+//   u.String()     // returns "Vec(4.5, -1.3)"
+//   fmt.Println(u) // Vec(4.5, -1.3)
 func (u Vec) String() string {
 	return fmt.Sprintf("Vec(%v, %v)", u.X(), u.Y())
 }
-- 
GitLab