From 1a1d7972c17843e5857d0dbf6d4d78ff1ea7b81a Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Tue, 20 Dec 2016 02:41:19 +0900 Subject: [PATCH] graphics: Deprecated 'Add' func for affine matrices --- colorm.go | 3 ++- colorm_test.go | 14 -------------- geom.go | 3 ++- geom_test.go | 14 -------------- 4 files changed, 4 insertions(+), 30 deletions(-) diff --git a/colorm.go b/colorm.go index 7dcbf3a1b..6e9ff8c6d 100644 --- a/colorm.go +++ b/colorm.go @@ -39,7 +39,8 @@ func (c *ColorM) Concat(other ColorM) { c.impl.Concat(other.impl) } -// Add adds a color matrix with the other color matrix. +// Add is deprecated as of 1.5.0-alpha. +// Note that this doesn't make sense in terms of additions two affine matrices. func (c *ColorM) Add(other ColorM) { c.impl.Add(other.impl) } diff --git a/colorm_test.go b/colorm_test.go index 0f9b7e7d2..067c743d2 100644 --- a/colorm_test.go +++ b/colorm_test.go @@ -47,20 +47,6 @@ func TestColorInit(t *testing.T) { } } } - - m.Add(m) - for i := 0; i < ColorMDim-1; i++ { - for j := 0; j < ColorMDim; j++ { - got := m.Element(i, j) - want := 0.0 - if i == j { - want = 2 - } - if want != got { - t.Errorf("m.Element(%d, %d) = %f, want %f", i, j, got, want) - } - } - } } func TestColorAssign(t *testing.T) { diff --git a/geom.go b/geom.go index cfea42abb..4b1714fba 100644 --- a/geom.go +++ b/geom.go @@ -39,7 +39,8 @@ func (g *GeoM) Concat(other GeoM) { g.impl.Concat(other.impl) } -// Add adds a geometry matrix with the other geometry matrix. +// Add is deprecated as of 1.5.0-alpha. +// Note that this doesn't make sense in terms of additions two affine matrices. func (g *GeoM) Add(other GeoM) { g.impl.Add(other.impl) } diff --git a/geom_test.go b/geom_test.go index bbb798fe5..984b5a001 100644 --- a/geom_test.go +++ b/geom_test.go @@ -33,20 +33,6 @@ func TestGeometryInit(t *testing.T) { } } } - - m.Add(m) - for i := 0; i < GeoMDim-1; i++ { - for j := 0; j < GeoMDim; j++ { - got := m.Element(i, j) - want := 0.0 - if i == j { - want = 2 - } - if want != got { - t.Errorf("m.Element(%d, %d) = %f, want %f", i, j, got, want) - } - } - } } func TestGeometryAssign(t *testing.T) {