Initialise HLL with error

pull/7913/head
Edd Robinson 2016-12-02 12:10:39 +00:00 committed by Ben Johnson
parent 745b1973a8
commit 1339c7b146
No known key found for this signature in database
GPG Key ID: 81741CD251883081
1 changed files with 9 additions and 0 deletions

View File

@ -86,6 +86,15 @@ func NewPlus(p uint8) (*Plus, error) {
return hll, nil
}
// NewDefaultPlus creates a new Plus with the default precision.
func NewDefaultPlus() *Plus {
p, err := NewPlus(DefaultPrecision)
if err != nil {
panic(err)
}
return p
}
// MustNewPlus returns a new Plus with precision p. Panic on error.
func MustNewPlus(p uint8) *Plus {
hll, err := NewPlus(p)