From e7a2af61fb2b2f6c76e85541a2c655e8263602fa Mon Sep 17 00:00:00 2001 From: faiface <faiface@ksp.sk> Date: Thu, 26 Jan 2017 23:40:29 +0100 Subject: [PATCH] reorder methods of TrianglesData --- graphics.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/graphics.go b/graphics.go index d428b36..eceaad8 100644 --- a/graphics.go +++ b/graphics.go @@ -13,16 +13,6 @@ type TrianglesData []struct { Texture Vec } -// Len returns the number of vertices in TrianglesData. -func (td *TrianglesData) Len() int { - return len(*td) -} - -// Draw is unimplemented for TrianglesData and panics. -func (td *TrianglesData) Draw() { - panic(fmt.Errorf("%T.Draw: invalid operation", td)) -} - // SetLen resizes TrianglesData to len, while keeping the original content. // // If len is greater than TrianglesData's current length, the new data is filled with default @@ -43,6 +33,16 @@ func (td *TrianglesData) SetLen(len int) { } } +// Len returns the number of vertices in TrianglesData. +func (td *TrianglesData) Len() int { + return len(*td) +} + +// Draw is unimplemented for TrianglesData and panics. +func (td *TrianglesData) Draw() { + panic(fmt.Errorf("%T.Draw: invalid operation", td)) +} + func (td *TrianglesData) updateData(offset int, t Triangles) { // fast path optimization if t, ok := t.(*TrianglesData); ok { -- GitLab