Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Unified Diff: third_party/go/src/golang.org/x/mobile/f32/mat3.go

Issue 1275153002: Remove third_party/golang.org/x/mobile as it is no longer used with Go 1.5. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Remove golang.org/x/mobile Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/go/src/golang.org/x/mobile/f32/mat3.go
diff --git a/third_party/go/src/golang.org/x/mobile/f32/mat3.go b/third_party/go/src/golang.org/x/mobile/f32/mat3.go
deleted file mode 100644
index 2577dbfa9263d481d81728010156c42e44c17cab..0000000000000000000000000000000000000000
--- a/third_party/go/src/golang.org/x/mobile/f32/mat3.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package f32
-
-import "fmt"
-
-// A Mat3 is a 3x3 matrix of float32 values.
-// Elements are indexed first by row then column, i.e. m[row][column].
-type Mat3 [3]Vec3
-
-func (m Mat3) String() string {
- return fmt.Sprintf(`Mat3[% 0.3f, % 0.3f, % 0.3f,
- % 0.3f, % 0.3f, % 0.3f,
- % 0.3f, % 0.3f, % 0.3f]`,
- m[0][0], m[0][1], m[0][2],
- m[1][0], m[1][1], m[1][2],
- m[2][0], m[2][1], m[2][2])
-}
-
-func (m *Mat3) Identity() {
- *m = Mat3{
- {1, 0, 0},
- {0, 1, 0},
- {0, 0, 1},
- }
-}
-
-func (m *Mat3) Eq(n *Mat3, epsilon float32) bool {
- for i := range m {
- for j := range m[i] {
- diff := m[i][j] - n[i][j]
- if diff < -epsilon || +epsilon < diff {
- return false
- }
- }
- }
- return true
-}
-
-// Mul stores a × b in m.
-func (m *Mat3) Mul(a, b *Mat3) {
- // Store the result in local variables, in case m == a || m == b.
- m00 := a[0][0]*b[0][0] + a[0][1]*b[1][0] + a[0][2]*b[2][0]
- m01 := a[0][0]*b[0][1] + a[0][1]*b[1][1] + a[0][2]*b[2][1]
- m02 := a[0][0]*b[0][2] + a[0][1]*b[1][2] + a[0][2]*b[2][2]
- m10 := a[1][0]*b[0][0] + a[1][1]*b[1][0] + a[1][2]*b[2][0]
- m11 := a[1][0]*b[0][1] + a[1][1]*b[1][1] + a[1][2]*b[2][1]
- m12 := a[1][0]*b[0][2] + a[1][1]*b[1][2] + a[1][2]*b[2][2]
- m20 := a[2][0]*b[0][0] + a[2][1]*b[1][0] + a[2][2]*b[2][0]
- m21 := a[2][0]*b[0][1] + a[2][1]*b[1][1] + a[2][2]*b[2][1]
- m22 := a[2][0]*b[0][2] + a[2][1]*b[1][2] + a[2][2]*b[2][2]
- m[0][0] = m00
- m[0][1] = m01
- m[0][2] = m02
- m[1][0] = m10
- m[1][1] = m11
- m[1][2] = m12
- m[2][0] = m20
- m[2][1] = m21
- m[2][2] = m22
-}
« no previous file with comments | « third_party/go/src/golang.org/x/mobile/f32/gen.go ('k') | third_party/go/src/golang.org/x/mobile/f32/mat4.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698