summaryrefslogtreecommitdiff
path: root/util.go
diff options
context:
space:
mode:
authorKurt Jung <kurt.w.jung@gmail.com>2015-07-04 13:18:12 -0400
committerKurt Jung <kurt.w.jung@gmail.com>2015-07-04 13:18:12 -0400
commit1d655638f9c01bdf29aaee195a6628e79f963cfb (patch)
tree18d446216908d4bbddde478010c9052c6ad870ee /util.go
parent5ab948816dec877984e3c1c031f423cb7fccf30f (diff)
parentf0690e7eabd6a1dc812923ce417ebdb7da490f14 (diff)
Claudio Felber's dashed line implementation
Diffstat (limited to 'util.go')
-rw-r--r--util.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/util.go b/util.go
index d3b114f..ed4ffdd 100644
--- a/util.go
+++ b/util.go
@@ -69,6 +69,19 @@ func bufferFromReader(r io.Reader) (b *bytes.Buffer, err error) {
return
}
+// Returns true if the two specified integer slices are equal
+func slicesEqual(a, b []float64) bool {
+ if len(a) != len(b) {
+ return false
+ }
+ for i := range a {
+ if a[i] != b[i] {
+ return false
+ }
+ }
+ return true
+}
+
// Returns a zlib-compressed copy of the specified byte array
func sliceCompress(data []byte) []byte {
var buf bytes.Buffer