1 // Copyright 2015 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Package f32 implements float32 vector and matrix types. 6 package f32 // import "golang.org/x/image/math/f32" 7 8 // Vec2 is a 2-element vector. 9 type Vec2 [2]float32 10 11 // Vec3 is a 3-element vector. 12 type Vec3 [3]float32 13 14 // Vec4 is a 4-element vector. 15 type Vec4 [4]float32 16 17 // Mat3 is a 3x3 matrix in row major order. 18 // 19 // m[3*r + c] is the element in the r'th row and c'th column. 20 type Mat3 [9]float32 21 22 // Mat4 is a 4x4 matrix in row major order. 23 // 24 // m[4*r + c] is the element in the r'th row and c'th column. 25 type Mat4 [16]float32 26 27 // Aff3 is a 3x3 affine transformation matrix in row major order, where the 28 // bottom row is implicitly [0 0 1]. 29 // 30 // m[3*r + c] is the element in the r'th row and c'th column. 31 type Aff3 [6]float32 32 33 // Aff4 is a 4x4 affine transformation matrix in row major order, where the 34 // bottom row is implicitly [0 0 0 1]. 35 // 36 // m[4*r + c] is the element in the r'th row and c'th column. 37 type Aff4 [12]float32 38