From 3029cff51e846ce5a1e49e181ba1811c6e69cc00 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Thu, 6 Aug 2015 14:46:52 +1000 Subject: [PATCH] math/fixed: add point types. Change-Id: Ie9ae62eab3c484034ee8207a2b2e573ec6f1464e Reviewed-on: https://go-review.googlesource.com/13294 Reviewed-by: Rob Pike --- 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 +}