Fix comments

This commit is contained in:
Hajime Hoshi 2014-12-24 23:35:01 +09:00
parent cb510fafa7
commit 742c7ad854
4 changed files with 6 additions and 4 deletions

View File

@ -28,6 +28,7 @@ const ColorMatrixDim = 5
// Before applying a matrix, a color is un-multiplied, and after applying the matrix, // Before applying a matrix, a color is un-multiplied, and after applying the matrix,
// the color is multiplied again. // the color is multiplied again.
type ColorMatrix struct { type ColorMatrix struct {
// es represents elements.
es [ColorMatrixDim - 1][ColorMatrixDim]float64 es [ColorMatrixDim - 1][ColorMatrixDim]float64
} }

View File

@ -20,8 +20,8 @@ import (
) )
func TestColorIdentity(t *testing.T) { func TestColorIdentity(t *testing.T) {
ebiten := ColorMatrixI() m := ColorMatrixI()
got := ebiten.IsIdentity() got := m.IsIdentity()
want := true want := true
if want != got { if want != got {
t.Errorf("matrix.IsIdentity() = %t, want %t", got, want) t.Errorf("matrix.IsIdentity() = %t, want %t", got, want)

View File

@ -23,6 +23,7 @@ const GeometryMatrixDim = 3
// A GeometryMatrix represents a matrix to transform geometry when rendering an image. // A GeometryMatrix represents a matrix to transform geometry when rendering an image.
type GeometryMatrix struct { type GeometryMatrix struct {
// es represents elements.
es [GeometryMatrixDim - 1][GeometryMatrixDim]float64 es [GeometryMatrixDim - 1][GeometryMatrixDim]float64
} }

View File

@ -20,8 +20,8 @@ import (
) )
func TestGeometryIdentity(t *testing.T) { func TestGeometryIdentity(t *testing.T) {
ebiten := GeometryMatrixI() m := GeometryMatrixI()
got := ebiten.IsIdentity() got := m.IsIdentity()
want := true want := true
if want != got { if want != got {
t.Errorf("matrix.IsIdentity() = %t, want %t", got, want) t.Errorf("matrix.IsIdentity() = %t, want %t", got, want)