git.lucas.co / go_mono
git clone https://git.lucas.co/go_mono.git

commit3029cff51e846ce5a1e49e181ba1811c6e69cc00
parent8e3389fa81
authorNigel Tao <nigeltao@golang.org>
date2015-08-06 14:46
math/fixed: add point types.

Change-Id: Ie9ae62eab3c484034ee8207a2b2e573ec6f1464e
Reviewed-on: https://go-review.googlesource.com/13294
Reviewed-by: Rob Pike <r@golang.org>

 math/fixed/fixed.go | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/math/fixed/fixed.go b/math/fixed/fixed.go
index e3dca01..f943419 100644
--- a/math/fixed/fixed.go
+++ b/math/fixed/fixed.go
@@ -57,3 +57,13 @@ func (x Int52_12) String() string {
 	}
 	return "-2251799813685248:0000" // The minimum value is -(1<<51).
 }
+
+// Point26_6 is a 26.6 fixed-point coordinate pair.
+type Point26_6 struct {
+	X, Y Int26_6
+}
+
+// Point52_12 is a 52.12 fixed-point coordinate pair.
+type Point52_12 struct {
+	X, Y Int52_12
+}