f64.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. // Package f64 implements float64 vector and matrix types.
  5. package f64 // import "golang.org/x/image/math/f64"
  6. // Vec2 is a 2-element vector.
  7. type Vec2 [2]float64
  8. // Vec3 is a 3-element vector.
  9. type Vec3 [3]float64
  10. // Vec4 is a 4-element vector.
  11. type Vec4 [4]float64
  12. // Mat3 is a 3x3 matrix in row major order.
  13. //
  14. // m[3*r + c] is the element in the r'th row and c'th column.
  15. type Mat3 [9]float64
  16. // Mat4 is a 4x4 matrix in row major order.
  17. //
  18. // m[4*r + c] is the element in the r'th row and c'th column.
  19. type Mat4 [16]float64
  20. // Aff3 is a 3x3 affine transformation matrix in row major order, where the
  21. // bottom row is implicitly [0 0 1].
  22. //
  23. // m[3*r + c] is the element in the r'th row and c'th column.
  24. type Aff3 [6]float64
  25. // Aff4 is a 4x4 affine transformation matrix in row major order, where the
  26. // bottom row is implicitly [0 0 0 1].
  27. //
  28. // m[4*r + c] is the element in the r'th row and c'th column.
  29. type Aff4 [12]float64