mirror of https://github.com/tidwall/rtred.git
removed init
This commit is contained in:
parent
b71853025b
commit
8904718ccc
|
@ -57,11 +57,7 @@ const (
|
|||
|
||||
type ResultCallback func(dataID interface{}) bool
|
||||
|
||||
var unitSphereVolume float64
|
||||
|
||||
func init() {
|
||||
// Precomputed volumes of the unit spheres for the first few dimensions
|
||||
unitSphereVolume = []float64{
|
||||
var unitSphereVolume = []float64{
|
||||
0.000000, 2.000000, 3.141593, // Dimension 0,1,2
|
||||
4.188790, 4.934802, 5.263789, // Dimension 3,4,5
|
||||
5.167713, 4.724766, 4.058712, // Dimension 6,7,8
|
||||
|
@ -70,7 +66,6 @@ func init() {
|
|||
0.381443, 0.235331, 0.140981, // Dimension 15,16,17
|
||||
0.082146, 0.046622, 0.025807, // Dimension 18,19,20
|
||||
}[NUMDIMS]
|
||||
}
|
||||
|
||||
type RTree struct {
|
||||
root *Node ///< Root of tree
|
||||
|
|
|
@ -57,11 +57,7 @@ const (
|
|||
|
||||
type ResultCallback func(dataID interface{}) bool
|
||||
|
||||
var unitSphereVolume float64
|
||||
|
||||
func init() {
|
||||
// Precomputed volumes of the unit spheres for the first few dimensions
|
||||
unitSphereVolume = []float64{
|
||||
var unitSphereVolume = []float64{
|
||||
0.000000, 2.000000, 3.141593, // Dimension 0,1,2
|
||||
4.188790, 4.934802, 5.263789, // Dimension 3,4,5
|
||||
5.167713, 4.724766, 4.058712, // Dimension 6,7,8
|
||||
|
@ -70,7 +66,6 @@ func init() {
|
|||
0.381443, 0.235331, 0.140981, // Dimension 15,16,17
|
||||
0.082146, 0.046622, 0.025807, // Dimension 18,19,20
|
||||
}[NUMDIMS]
|
||||
}
|
||||
|
||||
type RTree struct {
|
||||
root *Node ///< Root of tree
|
||||
|
|
|
@ -57,11 +57,7 @@ const (
|
|||
|
||||
type ResultCallback func(dataID interface{}) bool
|
||||
|
||||
var unitSphereVolume float64
|
||||
|
||||
func init() {
|
||||
// Precomputed volumes of the unit spheres for the first few dimensions
|
||||
unitSphereVolume = []float64{
|
||||
var unitSphereVolume = []float64{
|
||||
0.000000, 2.000000, 3.141593, // Dimension 0,1,2
|
||||
4.188790, 4.934802, 5.263789, // Dimension 3,4,5
|
||||
5.167713, 4.724766, 4.058712, // Dimension 6,7,8
|
||||
|
@ -70,7 +66,6 @@ func init() {
|
|||
0.381443, 0.235331, 0.140981, // Dimension 15,16,17
|
||||
0.082146, 0.046622, 0.025807, // Dimension 18,19,20
|
||||
}[NUMDIMS]
|
||||
}
|
||||
|
||||
type RTree struct {
|
||||
root *Node ///< Root of tree
|
||||
|
|
|
@ -57,11 +57,7 @@ const (
|
|||
|
||||
type ResultCallback func(dataID interface{}) bool
|
||||
|
||||
var unitSphereVolume float64
|
||||
|
||||
func init() {
|
||||
// Precomputed volumes of the unit spheres for the first few dimensions
|
||||
unitSphereVolume = []float64{
|
||||
var unitSphereVolume = []float64{
|
||||
0.000000, 2.000000, 3.141593, // Dimension 0,1,2
|
||||
4.188790, 4.934802, 5.263789, // Dimension 3,4,5
|
||||
5.167713, 4.724766, 4.058712, // Dimension 6,7,8
|
||||
|
@ -70,7 +66,6 @@ func init() {
|
|||
0.381443, 0.235331, 0.140981, // Dimension 15,16,17
|
||||
0.082146, 0.046622, 0.025807, // Dimension 18,19,20
|
||||
}[NUMDIMS]
|
||||
}
|
||||
|
||||
type RTree struct {
|
||||
root *Node ///< Root of tree
|
||||
|
|
|
@ -57,11 +57,7 @@ const (
|
|||
|
||||
type ResultCallback func(dataID interface{}) bool
|
||||
|
||||
var unitSphereVolume float64
|
||||
|
||||
func init() {
|
||||
// Precomputed volumes of the unit spheres for the first few dimensions
|
||||
unitSphereVolume = []float64{
|
||||
var unitSphereVolume = []float64{
|
||||
0.000000, 2.000000, 3.141593, // Dimension 0,1,2
|
||||
4.188790, 4.934802, 5.263789, // Dimension 3,4,5
|
||||
5.167713, 4.724766, 4.058712, // Dimension 6,7,8
|
||||
|
@ -70,7 +66,6 @@ func init() {
|
|||
0.381443, 0.235331, 0.140981, // Dimension 15,16,17
|
||||
0.082146, 0.046622, 0.025807, // Dimension 18,19,20
|
||||
}[NUMDIMS]
|
||||
}
|
||||
|
||||
type RTree struct {
|
||||
root *Node ///< Root of tree
|
||||
|
|
Loading…
Reference in New Issue