math/fixed: add point types.

Change-Id: Ie9ae62eab3c484034ee8207a2b2e573ec6f1464e
Reviewed-on: https://go-review.googlesource.com/13294
Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
Nigel Tao 2015-08-06 14:46:52 +10:00
parent 8e3389fa81
commit 3029cff51e

View File

@ -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
}