math/f32, math/f64: add Aff3 and Aff4 types.

Change-Id: I504a070cf178aa688090ba50136db06856c16f73
Reviewed-on: https://go-review.googlesource.com/6552
Reviewed-by: David Crawshaw <crawshaw@golang.org>
diff --git a/math/f32/f32.go b/math/f32/f32.go
index 7dcc9fc..c5ae26e 100644
--- a/math/f32/f32.go
+++ b/math/f32/f32.go
@@ -23,3 +23,15 @@
 //
 // m[4*r + c] is the element in the r'th row and c'th column.
 type Mat4 [16]float32
+
+// Aff3 is a 3x3 matrix in row major order, where the bottom row
+// is implicitly [0 0 1].
+//
+// m[3*r + c] is the element in the r'th row and c'th column.
+type Aff3 [6]float32
+
+// Aff4 is a 4x4 matrix in row major order, where the bottom row
+// is implicitly [0 0 0 1].
+//
+// m[4*r + c] is the element in the r'th row and c'th column.
+type Aff4 [12]float32
diff --git a/math/f64/f64.go b/math/f64/f64.go
index 8fd32ea..7187a7d 100644
--- a/math/f64/f64.go
+++ b/math/f64/f64.go
@@ -23,3 +23,15 @@
 //
 // m[4*r + c] is the element in the r'th row and c'th column.
 type Mat4 [16]float64
+
+// Aff3 is a 3x3 matrix in row major order, where the bottom row
+// is implicitly [0 0 1].
+//
+// m[3*r + c] is the element in the r'th row and c'th column.
+type Aff3 [6]float64
+
+// Aff4 is a 4x4 matrix in row major order, where the bottom row
+// is implicitly [0 0 0 1].
+//
+// m[4*r + c] is the element in the r'th row and c'th column.
+type Aff4 [12]float64