Initialise HLL with error
parent
745b1973a8
commit
1339c7b146
|
@ -86,6 +86,15 @@ func NewPlus(p uint8) (*Plus, error) {
|
||||||
return hll, nil
|
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.
|
// MustNewPlus returns a new Plus with precision p. Panic on error.
|
||||||
func MustNewPlus(p uint8) *Plus {
|
func MustNewPlus(p uint8) *Plus {
|
||||||
hll, err := NewPlus(p)
|
hll, err := NewPlus(p)
|
||||||
|
|
Loading…
Reference in New Issue