github.com/metaworking/channeld@v0.7.3/pkg/channeldpb/extension.go (about)

     1  package channeldpb
     2  
     3  import "math"
     4  
     5  func (broadcast BroadcastType) Check(value uint32) bool {
     6  	return value&uint32(broadcast) > 0
     7  }
     8  
     9  func (info1 *SpatialInfo) Dist2D(info2 *SpatialInfo) float64 {
    10  	return math.Sqrt((info1.X-info2.X)*(info1.X-info2.X) + (info1.Z-info2.Z)*(info1.Z-info2.Z))
    11  }