Skip to content

Commit

Permalink
add: New func
Browse files Browse the repository at this point in the history
  • Loading branch information
n4mine committed Jul 25, 2019
1 parent e9f4b21 commit 08b18a9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions downsample.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import (
"sort"
)

func NewPoints() Points {
return make(Points, 0)
}

func (ps Points) Downsample(newStep int) Points {
if len(ps) == 0 {
return []Point{}
Expand Down

0 comments on commit 08b18a9

Please sign in to comment.